@pellux/goodvibes-tui 0.18.23 → 0.19.1
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 +71 -0
- package/README.md +1 -1
- package/docs/foundation-artifacts/operator-contract.json +1 -1
- package/package.json +7 -3
- package/src/core/conversation-rendering.ts +8 -6
- package/src/core/orchestrator.ts +1 -1
- package/src/daemon/cli.ts +54 -0
- package/src/input/commands/diff-runtime.ts +6 -5
- package/src/input/commands/guidance-runtime.ts +1 -1
- package/src/input/commands/health-runtime.ts +2 -2
- package/src/input/commands/local-setup-review.ts +1 -1
- package/src/input/commands/session-content.ts +1 -1
- package/src/input/commands/shell-core.ts +3 -2
- package/src/input/commands/skills-runtime.ts +2 -2
- package/src/input/commands/subscription-runtime.ts +4 -4
- package/src/input/handler.ts +8 -10
- package/src/input/model-picker.ts +6 -2
- package/src/input/panel-integration-actions.ts +2 -1
- package/src/input/settings-modal-types.ts +60 -0
- package/src/input/settings-modal.ts +83 -65
- package/src/main.ts +52 -0
- package/src/panels/agent-inspector-panel.ts +10 -9
- package/src/panels/agent-logs-panel.ts +26 -6
- package/src/panels/approval-panel.ts +1 -0
- package/src/panels/automation-control-panel.ts +1 -0
- package/src/panels/base-panel.ts +108 -3
- package/src/panels/communication-panel.ts +1 -0
- package/src/panels/context-visualizer-panel.ts +2 -0
- package/src/panels/control-plane-panel.ts +1 -0
- package/src/panels/diff-panel.ts +2 -0
- package/src/panels/file-explorer-panel.ts +51 -31
- package/src/panels/file-preview-panel.ts +57 -35
- package/src/panels/git-panel.ts +12 -13
- package/src/panels/hooks-panel.ts +3 -1
- package/src/panels/incident-review-panel.ts +4 -2
- package/src/panels/knowledge-panel.ts +75 -107
- package/src/panels/local-auth-panel.ts +1 -0
- package/src/panels/marketplace-panel.ts +51 -69
- package/src/panels/mcp-panel.ts +3 -1
- package/src/panels/memory-panel.ts +90 -158
- package/src/panels/ops-control-panel.ts +1 -0
- package/src/panels/orchestration-panel.ts +70 -51
- package/src/panels/panel-list-panel.ts +5 -4
- package/src/panels/panel-manager.ts +3 -0
- package/src/panels/plan-dashboard-panel.ts +2 -0
- package/src/panels/plugins-panel.ts +1 -0
- package/src/panels/polish.ts +51 -2
- package/src/panels/provider-accounts-panel.ts +1 -0
- package/src/panels/provider-health-panel.ts +6 -8
- package/src/panels/routes-panel.ts +3 -1
- package/src/panels/schedule-panel.ts +7 -6
- package/src/panels/scrollable-list-panel.ts +19 -2
- package/src/panels/security-panel.ts +17 -15
- package/src/panels/services-panel.ts +6 -4
- package/src/panels/session-browser-panel.ts +19 -18
- package/src/panels/settings-sync-panel.ts +3 -1
- package/src/panels/skills-panel.ts +114 -230
- package/src/panels/subscription-panel.ts +1 -0
- package/src/panels/system-messages-panel.ts +147 -141
- package/src/panels/tasks-panel.ts +1 -0
- package/src/panels/token-budget-panel.ts +2 -0
- package/src/panels/watchers-panel.ts +1 -0
- package/src/panels/worktree-panel.ts +1 -0
- package/src/panels/wrfc-panel.ts +2 -0
- package/src/renderer/agent-detail-modal.ts +2 -2
- package/src/renderer/ansi-sanitize.ts +76 -0
- package/src/renderer/buffer.ts +12 -1
- package/src/renderer/help-overlay.ts +14 -3
- package/src/renderer/model-picker-overlay.ts +9 -2
- package/src/renderer/settings-modal-helpers.ts +27 -0
- package/src/renderer/settings-modal.ts +18 -1
- package/src/renderer/status-glyphs.ts +21 -0
- package/src/renderer/status-token.ts +4 -8
- package/src/renderer/tool-call.ts +4 -3
- package/src/runtime/bootstrap-core.ts +1 -1
- package/src/runtime/bootstrap-hook-bridge.ts +1 -1
- package/src/runtime/bootstrap.ts +7 -8
- package/src/runtime/diagnostics/panels/policy.ts +2 -1
- package/src/shell/ui-openers.ts +44 -3
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,77 @@ All notable changes to GoodVibes TUI.
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## [0.19.1] — 2026-04-17
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- Upgraded `@pellux/goodvibes-sdk` from 0.21.1 to 0.21.6 — includes secrets-tier
|
|
11
|
+
`configuredVia` discriminator, HTTP `/api/providers` + `/api/providers/current` (GET/PATCH),
|
|
12
|
+
reactive `model.changed` SSE event, `BUILTIN_LABEL_MAP` brand-accurate provider labels,
|
|
13
|
+
and clean unconfigured-provider errors instead of silent 401 pass-through.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- `--provider <id>` and `--model <registryKey>` CLI flags for daemon startup
|
|
17
|
+
(`goodvibes-daemon`) and TUI shell startup (`goodvibes`). Both override
|
|
18
|
+
`~/.goodvibes/tui/settings.json` provider/model values for the session.
|
|
19
|
+
If `--model provider:modelId` format is used, `--provider` is inferred automatically.
|
|
20
|
+
- TUI model picker now populates `configuredVia` per provider and renders it as
|
|
21
|
+
a badge (`[env]`, `[sub]`, `[anon]`) in the provider-browse view, derived from
|
|
22
|
+
env-var presence and active OAuth subscription sessions.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **Venice-picking diagnosis**: the silent 401 Venice fallback was caused by the
|
|
26
|
+
pre-0.21.2 SDK passing unconfigured-provider requests through to the upstream API
|
|
27
|
+
unchanged. As of 0.21.2 (included in 0.21.6), `createCompanionProviderAdapter` now
|
|
28
|
+
checks `provider.isConfigured()` before `provider.chat()` and yields a structured
|
|
29
|
+
error immediately. The in-registry fallback to first-selectable-model (which may
|
|
30
|
+
resolve to venice on some installs) only triggers when `getCurrentModel()` cannot
|
|
31
|
+
find the stored `currentModelId` in the model registry — typically an old daemon
|
|
32
|
+
instance with stale config. Restarting the daemon after a settings.json change
|
|
33
|
+
resolves this; the `--model` CLI flag eliminates the need to edit settings.json
|
|
34
|
+
manually. ConfigManager reactivity (live disk-change → registry update) is out of
|
|
35
|
+
scope: the PATCH `/api/providers/current` route is the correct live-switch path
|
|
36
|
+
(calls `setCurrentModel()` + `configManager.set()` atomically).
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [0.19.0] — 2026-04-18
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
- Upgraded `@pellux/goodvibes-sdk` from 0.19.6 to 0.21.1 (soak-period release).
|
|
43
|
+
TUI adaptations required:
|
|
44
|
+
1. `docs/foundation-artifacts/operator-contract.json` — regenerated to match
|
|
45
|
+
updated `buildOperatorContract()` output (`peer-contract.json`, knowledge
|
|
46
|
+
artifacts unchanged).
|
|
47
|
+
2. `scripts/perf-check.ts` — `platform/runtime/perf/index` barrel removed;
|
|
48
|
+
`createPerfMonitor()` factory removed; migrated to `new PerfMonitor()` with
|
|
49
|
+
imports split to `perf/monitor` and `perf/reporter` sub-paths.
|
|
50
|
+
3. `scripts/eval-gate.ts` — `platform/runtime/eval/index` barrel removed;
|
|
51
|
+
imports split to `eval/baseline`, `eval/format`, and `eval/scorecard`.
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
- Wave B panel migration: migrated 5 panels (knowledge, marketplace, memory,
|
|
55
|
+
system-messages, orchestration) to `ScrollableListPanel<T>`/`SearchableListPanel<T>`
|
|
56
|
+
generics; added `docs/panel-authoring.md` as the canonical panel authoring guide.
|
|
57
|
+
- Wave C-α reliability pass: F-perf-01 (trackedRender on 5 hot panels),
|
|
58
|
+
F-perf-02 (async panel fs + skills-panel de-blocking), F-perf-03 (timer registry
|
|
59
|
+
+ 5-panel zombie-timer leak prevention), F-errors-02 (observable async failures —
|
|
60
|
+
no silent `.catch(() => {})`), F-sec-02 (ANSI escape sanitization at
|
|
61
|
+
tool-call untrusted-content entry points).
|
|
62
|
+
- `src/input/settings-modal-types.ts`: extracted `SettingsCategory`,
|
|
63
|
+
`SETTINGS_CATEGORIES`, `SettingEntry`, `FlagEntry`, `McpEntry`,
|
|
64
|
+
`SubscriptionEntry` type definitions out of the settings-modal module.
|
|
65
|
+
|
|
66
|
+
### Security
|
|
67
|
+
- Postinstall patcher from `@pellux/goodvibes-sdk@0.21.1` mitigates three
|
|
68
|
+
minimatch ReDoS advisories in the consumer install tree.
|
|
69
|
+
- Added `overrides: { minimatch: ^10.2.5 }` to TUI's own `package.json`
|
|
70
|
+
so `npm audit` reports clean for the TUI install tree independently.
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
- Foundation artifacts gate now passes: `operator-contract.json` updated to
|
|
74
|
+
match SDK 0.21.1 `buildOperatorContract()` canonical output.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
7
78
|
## [0.18.23] — 2026-04-16
|
|
8
79
|
|
|
9
80
|
### Wave 4α+β performance bundle + α review follow-ups + regression fixes
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/mgd34msu/goodvibes-tui/actions/workflows/ci.yml)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://github.com/mgd34msu/goodvibes-tui)
|
|
6
6
|
|
|
7
7
|
A terminal-native AI coding, operations, automation, knowledge, and integration console with a typed runtime, omnichannel surfaces, structured memory/knowledge, and a raw ANSI renderer.
|
|
8
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-tui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "Terminal-native GoodVibes product for coding, operations, automation, knowledge, channels, and daemon-backed control-plane workflows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/main.ts",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"@anthropic-ai/vertex-sdk": "^0.16.0",
|
|
90
90
|
"@ast-grep/napi": "^0.42.0",
|
|
91
91
|
"@aws/bedrock-token-generator": "^1.1.0",
|
|
92
|
-
"@pellux/goodvibes-sdk": "0.
|
|
92
|
+
"@pellux/goodvibes-sdk": "0.21.6",
|
|
93
93
|
"bash-language-server": "^5.6.0",
|
|
94
94
|
"fuse.js": "^7.1.0",
|
|
95
95
|
"graphql": "^16.13.2",
|
|
@@ -115,8 +115,12 @@
|
|
|
115
115
|
"typescript": "^5.9.3"
|
|
116
116
|
},
|
|
117
117
|
"trustedDependencies": [
|
|
118
|
+
"@pellux/goodvibes-sdk",
|
|
118
119
|
"tree-sitter-css",
|
|
119
120
|
"tree-sitter-javascript",
|
|
120
121
|
"tree-sitter-python"
|
|
121
|
-
]
|
|
122
|
+
],
|
|
123
|
+
"overrides": {
|
|
124
|
+
"minimatch": "^10.2.5"
|
|
125
|
+
}
|
|
122
126
|
}
|
|
@@ -110,12 +110,14 @@ export function renderConversationAssistantMessage(
|
|
|
110
110
|
// determines `numWidth` (digit count) and thus `gutterW` (gutter column width).
|
|
111
111
|
// 2. Render pass: render at `width - gutterW` with the gutter factored in.
|
|
112
112
|
//
|
|
113
|
-
// Single-pass is not
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
118
|
-
//
|
|
113
|
+
// Single-pass is not pursued here. It would require either a pessimistic
|
|
114
|
+
// `numWidth=6` (fits 999,999 lines, but wastes 3-4 gutter columns on typical
|
|
115
|
+
// messages) or rendering the numbered output into a scratch buffer and trimming.
|
|
116
|
+
// Neither is clearly better than the current two-pass measurement approach.
|
|
117
|
+
// The 4α commit message claim that this "eliminates double-parse when line
|
|
118
|
+
// numbers are enabled" was inaccurate: 4α eliminated the legacy
|
|
119
|
+
// `renderMarkdown()` duplicate used for code-block line-number mode ('code').
|
|
120
|
+
// The 'all' mode double-call is a deliberate design choice and remains unchanged.
|
|
119
121
|
const measureWidth = showAllLineNumbers ? width : 0;
|
|
120
122
|
const totalLines = showAllLineNumbers
|
|
121
123
|
? renderMarkdownTracked(message.content, measureWidth, { codeBlockLineNumbers: false }).lines.length
|
package/src/core/orchestrator.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Thin TUI wrapper — re-exports the SDK Orchestrator unchanged.
|
|
2
2
|
// The SDK class already contains all behaviour including getSpinner().
|
|
3
|
-
export { Orchestrator } from '@pellux/goodvibes-sdk/platform/core/orchestrator';
|
|
3
|
+
export { Orchestrator, type OrchestratorOptions } from '@pellux/goodvibes-sdk/platform/core/orchestrator';
|
package/src/daemon/cli.ts
CHANGED
|
@@ -22,6 +22,49 @@ type DaemonCliOwnership = {
|
|
|
22
22
|
readonly homeDirectory: string;
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
// CLI flag parsing
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
|
|
29
|
+
type DaemonCliFlags = {
|
|
30
|
+
readonly provider: string | undefined;
|
|
31
|
+
readonly model: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
function parseDaemonCliFlags(argv: readonly string[]): DaemonCliFlags {
|
|
35
|
+
let provider: string | undefined;
|
|
36
|
+
let model: string | undefined;
|
|
37
|
+
|
|
38
|
+
for (let i = 0; i < argv.length; i++) {
|
|
39
|
+
const arg = argv[i];
|
|
40
|
+
if (arg === '--help' || arg === '-h') {
|
|
41
|
+
// eslint-disable-next-line no-console
|
|
42
|
+
console.log([
|
|
43
|
+
'Usage: goodvibes-daemon [options]',
|
|
44
|
+
'',
|
|
45
|
+
'Options:',
|
|
46
|
+
' --provider <id> Override the provider from settings.json at startup',
|
|
47
|
+
' --model <registryKey> Override the model from settings.json at startup',
|
|
48
|
+
' Format: provider:modelId (e.g. inception:mercury-2)',
|
|
49
|
+
' If provider:modelId format is used, --provider is inferred',
|
|
50
|
+
' --help, -h Show this help message',
|
|
51
|
+
].join('\n'));
|
|
52
|
+
process.exit(0);
|
|
53
|
+
}
|
|
54
|
+
if (arg === '--provider' && argv[i + 1] !== undefined) {
|
|
55
|
+
provider = argv[++i];
|
|
56
|
+
} else if (arg === '--model' && argv[i + 1] !== undefined) {
|
|
57
|
+
model = argv[++i];
|
|
58
|
+
// Infer provider from registryKey format (provider:modelId) if --provider not given
|
|
59
|
+
if (typeof model === 'string' && model.includes(':') && provider === undefined) {
|
|
60
|
+
provider = model.split(':')[0];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return { provider, model };
|
|
66
|
+
}
|
|
67
|
+
|
|
25
68
|
type DaemonCliTokens = {
|
|
26
69
|
readonly daemonToken: string | undefined;
|
|
27
70
|
readonly httpToken: string | undefined;
|
|
@@ -72,6 +115,17 @@ async function main(): Promise<void> {
|
|
|
72
115
|
const { workingDirectory: workingDir, homeDirectory } = resolveDaemonCliOwnership();
|
|
73
116
|
const config = new ConfigManager({ workingDir, homeDir: homeDirectory, surfaceRoot: 'tui' });
|
|
74
117
|
new GlobalNetworkTransportInstaller().install(config);
|
|
118
|
+
|
|
119
|
+
// Apply CLI flags — override settings.json before the provider registry is constructed
|
|
120
|
+
const cliFlags = parseDaemonCliFlags(process.argv.slice(2));
|
|
121
|
+
if (cliFlags.provider !== undefined) {
|
|
122
|
+
config.set('provider.provider', cliFlags.provider);
|
|
123
|
+
logger.info('daemon: --provider flag applied', { provider: cliFlags.provider });
|
|
124
|
+
}
|
|
125
|
+
if (cliFlags.model !== undefined) {
|
|
126
|
+
config.set('provider.model', cliFlags.model);
|
|
127
|
+
logger.info('daemon: --model flag applied', { model: cliFlags.model });
|
|
128
|
+
}
|
|
75
129
|
const runtimeBus = new RuntimeEventBus();
|
|
76
130
|
const runtimeStore = createRuntimeStore();
|
|
77
131
|
const runtimeServices = createRuntimeServices({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { join } from 'path';
|
|
2
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
|
|
2
3
|
import type { CommandRegistry } from '../command-registry.ts';
|
|
3
4
|
import { requirePanelManager, requireSessionChangeTracker, requireShellPaths } from './runtime-services.ts';
|
|
4
5
|
|
|
@@ -86,7 +87,7 @@ export function registerDiffRuntimeCommands(registry: CommandRegistry): void {
|
|
|
86
87
|
return (await new Response(proc.stdout).text()).trim().split('\n').filter(Boolean);
|
|
87
88
|
})();
|
|
88
89
|
if (workingChangedFiles.length > 0) {
|
|
89
|
-
enrichSemanticDiff(diffPanel, workingChangedFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch(() => {});
|
|
90
|
+
enrichSemanticDiff(diffPanel, workingChangedFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch((err) => { logger.debug('semantic diff enrichment failed', { err }); });
|
|
90
91
|
}
|
|
91
92
|
break;
|
|
92
93
|
}
|
|
@@ -111,7 +112,7 @@ export function registerDiffRuntimeCommands(registry: CommandRegistry): void {
|
|
|
111
112
|
return (await new Response(stagedProc.stdout).text()).trim().split('\n').filter(Boolean);
|
|
112
113
|
})();
|
|
113
114
|
if (stagedChangedFiles.length > 0) {
|
|
114
|
-
enrichSemanticDiff(diffPanel, stagedChangedFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch(() => {});
|
|
115
|
+
enrichSemanticDiff(diffPanel, stagedChangedFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch((err) => { logger.debug('semantic diff enrichment failed', { err }); });
|
|
115
116
|
}
|
|
116
117
|
}
|
|
117
118
|
break;
|
|
@@ -126,7 +127,7 @@ export function registerDiffRuntimeCommands(registry: CommandRegistry): void {
|
|
|
126
127
|
return (await new Response(proc.stdout).text()).trim().split('\n').filter(Boolean);
|
|
127
128
|
})();
|
|
128
129
|
if (headChangedFiles.length > 0) {
|
|
129
|
-
enrichSemanticDiff(diffPanel, headChangedFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch(() => {});
|
|
130
|
+
enrichSemanticDiff(diffPanel, headChangedFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch((err) => { logger.debug('semantic diff enrichment failed', { err }); });
|
|
130
131
|
}
|
|
131
132
|
break;
|
|
132
133
|
}
|
|
@@ -137,7 +138,7 @@ export function registerDiffRuntimeCommands(registry: CommandRegistry): void {
|
|
|
137
138
|
ctx.print(`Loading session diff (${sessionFiles.length} file${sessionFiles.length === 1 ? '' : 's'} changed this session)...`);
|
|
138
139
|
await diffPanel.showFileDiffs(sessionFiles, 'HEAD');
|
|
139
140
|
ctx.print(`Diff panel updated: ${sessionFiles.length} session file${sessionFiles.length === 1 ? '' : 's'}.`);
|
|
140
|
-
enrichSemanticDiff(diffPanel, sessionFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch(() => {});
|
|
141
|
+
enrichSemanticDiff(diffPanel, sessionFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch((err) => { logger.debug('semantic diff enrichment failed', { err }); });
|
|
141
142
|
} else {
|
|
142
143
|
ctx.print('No session changes tracked yet. Showing diff vs HEAD...');
|
|
143
144
|
await diffPanel.showGitDiff('HEAD');
|
|
@@ -148,7 +149,7 @@ export function registerDiffRuntimeCommands(registry: CommandRegistry): void {
|
|
|
148
149
|
return (await new Response(proc.stdout).text()).trim().split('\n').filter(Boolean);
|
|
149
150
|
})();
|
|
150
151
|
if (fallbackFiles.length > 0) {
|
|
151
|
-
enrichSemanticDiff(diffPanel, fallbackFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch(() => {});
|
|
152
|
+
enrichSemanticDiff(diffPanel, fallbackFiles, 'HEAD', () => ctx.renderRequest(), workingDirectory).catch((err) => { logger.debug('semantic diff enrichment failed', { err }); });
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
break;
|
|
@@ -64,7 +64,7 @@ export function registerGuidanceRuntimeCommands(registry: CommandRegistry): void
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
const providerApi = requireProviderApi(ctx);
|
|
67
|
-
const currentModel = await providerApi.getCurrentModel().catch(() => null);
|
|
67
|
+
const currentModel = await providerApi.getCurrentModel().catch(() => null); // best-effort: null handled as unknown context window
|
|
68
68
|
const llmMessages = ctx.session.conversationManager.getMessagesForLLM();
|
|
69
69
|
const readModels = requireReadModels(ctx);
|
|
70
70
|
const session = readModels.session.getSnapshot();
|
|
@@ -240,7 +240,7 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
240
240
|
if (sub === 'maintenance') {
|
|
241
241
|
const session = readModels.session.getSnapshot();
|
|
242
242
|
const providerApi = requireProviderApi(ctx);
|
|
243
|
-
const currentModel = await providerApi.getCurrentModel().catch(() => null);
|
|
243
|
+
const currentModel = await providerApi.getCurrentModel().catch(() => null); // best-effort: null handled as unknown context window
|
|
244
244
|
const llmMessages = typeof ctx.session.conversationManager.getMessagesForLLM === 'function'
|
|
245
245
|
? ctx.session.conversationManager.getMessagesForLLM()
|
|
246
246
|
: [];
|
|
@@ -369,7 +369,7 @@ export function registerHealthRuntimeCommands(registry: CommandRegistry): void {
|
|
|
369
369
|
|
|
370
370
|
const session = readModels.session.getSnapshot();
|
|
371
371
|
const providerApi = requireProviderApi(ctx);
|
|
372
|
-
const currentModel = await providerApi.getCurrentModel().catch(() => null);
|
|
372
|
+
const currentModel = await providerApi.getCurrentModel().catch(() => null); // best-effort: null handled as unknown context window
|
|
373
373
|
const llmMessages = typeof ctx.session.conversationManager.getMessagesForLLM === 'function'
|
|
374
374
|
? ctx.session.conversationManager.getMessagesForLLM()
|
|
375
375
|
: [];
|
|
@@ -22,7 +22,7 @@ export async function buildSetupReviewSnapshot(ctx: CommandContext): Promise<Set
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const skills = discoverSkills(shellPaths);
|
|
25
|
+
const skills = await discoverSkills(shellPaths);
|
|
26
26
|
const security = requireReadModels(ctx).security.getSnapshot();
|
|
27
27
|
const plugins = security.plugins;
|
|
28
28
|
const mcpServers = security.mcpServers;
|
|
@@ -161,7 +161,7 @@ export function registerSessionContentCommands(registry: CommandRegistry): void
|
|
|
161
161
|
|
|
162
162
|
registry.register({
|
|
163
163
|
name: 'undo',
|
|
164
|
-
aliases: [
|
|
164
|
+
aliases: [],
|
|
165
165
|
description: 'Undo last action. /undo file — revert last file write/edit. /undo — remove last conversation turn.',
|
|
166
166
|
usage: '[file]',
|
|
167
167
|
argsHint: '[file]',
|
|
@@ -5,6 +5,7 @@ import { REASONING_BUDGET_MAP } from '@pellux/goodvibes-sdk/platform/providers/i
|
|
|
5
5
|
import { executeWriteQuit } from './quit-shared.ts';
|
|
6
6
|
import { compactConversation, requireKeybindingsManager, requireProviderApi } from './runtime-services.ts';
|
|
7
7
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils/error-display';
|
|
8
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
|
|
8
9
|
|
|
9
10
|
export function registerShellCoreCommands(registry: CommandRegistry): void {
|
|
10
11
|
registry.register({
|
|
@@ -34,7 +35,7 @@ export function registerShellCoreCommands(registry: CommandRegistry): void {
|
|
|
34
35
|
ctx.platform.configManager.set('provider.model', selected.registryKey);
|
|
35
36
|
ctx.platform.configManager.set('provider.provider', selected.providerId);
|
|
36
37
|
ctx.print(`Switched to model: ${selected.displayName} (${selected.providerId})`);
|
|
37
|
-
void providerApi.recordModelUsage(selected.registryKey).catch(() =>
|
|
38
|
+
void providerApi.recordModelUsage(selected.registryKey).catch((err) => { logger.debug('model usage record failed', { err }); });
|
|
38
39
|
} catch (e) {
|
|
39
40
|
ctx.print(`Error: ${summarizeError(e)}`);
|
|
40
41
|
}
|
|
@@ -202,7 +203,7 @@ export function registerShellCoreCommands(registry: CommandRegistry): void {
|
|
|
202
203
|
|
|
203
204
|
registry.register({
|
|
204
205
|
name: 'quit',
|
|
205
|
-
aliases: ['
|
|
206
|
+
aliases: [':q'],
|
|
206
207
|
description: 'Exit the application',
|
|
207
208
|
handler(_args, ctx) {
|
|
208
209
|
ctx.exit();
|
|
@@ -19,7 +19,7 @@ export function registerSkillsRuntimeCommands(registry: CommandRegistry): void {
|
|
|
19
19
|
aliases: ['skill'],
|
|
20
20
|
description: 'Inspect installed skill packs',
|
|
21
21
|
usage: '[open|list|show <name>|origins|browse [query]|installed|catalog-review <id>|publish-local <id> <path> <summary...>|unpublish <id>|install-hint <catalog-id>|install <id> [project|user]|update <id> [project|user]|uninstall <id> [project|user]]',
|
|
22
|
-
handler(args, ctx) {
|
|
22
|
+
async handler(args, ctx) {
|
|
23
23
|
const sub = args[0] ?? 'open';
|
|
24
24
|
if (sub === 'open' || sub === 'panel') {
|
|
25
25
|
if (ctx.showPanel) ctx.showPanel('skills');
|
|
@@ -31,7 +31,7 @@ export function registerSkillsRuntimeCommands(registry: CommandRegistry): void {
|
|
|
31
31
|
}
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const skills = discoverSkills(requireShellPaths(ctx));
|
|
34
|
+
const skills = await discoverSkills(requireShellPaths(ctx));
|
|
35
35
|
const ecosystemPaths = requireEcosystemCatalogPaths(ctx);
|
|
36
36
|
if (sub === 'list') {
|
|
37
37
|
if (skills.length === 0) {
|
|
@@ -174,7 +174,7 @@ export function registerSubscriptionRuntimeCommands(registry: CommandRegistry):
|
|
|
174
174
|
const openBrowser = !flags.has('--no-browser');
|
|
175
175
|
const useManualMode = flags.has('--manual');
|
|
176
176
|
if (provider === 'openai' && resolved.source === 'builtin') {
|
|
177
|
-
const started = beginOpenAICodexLogin();
|
|
177
|
+
const started = await beginOpenAICodexLogin();
|
|
178
178
|
manager.savePending({
|
|
179
179
|
provider,
|
|
180
180
|
state: started.state,
|
|
@@ -191,7 +191,7 @@ export function registerSubscriptionRuntimeCommands(registry: CommandRegistry):
|
|
|
191
191
|
host: '127.0.0.1',
|
|
192
192
|
port: 1455,
|
|
193
193
|
path: '/auth/callback',
|
|
194
|
-
}).catch(() => null);
|
|
194
|
+
}).catch(() => null); // best-effort: listener creation is optional; null triggers manual flow
|
|
195
195
|
} catch {
|
|
196
196
|
listener = null;
|
|
197
197
|
}
|
|
@@ -272,14 +272,14 @@ export function registerSubscriptionRuntimeCommands(registry: CommandRegistry):
|
|
|
272
272
|
host: resolved.oauth.localCallback.host,
|
|
273
273
|
port: resolved.oauth.localCallback.port,
|
|
274
274
|
path: resolved.oauth.localCallback.path,
|
|
275
|
-
}).catch(() => null);
|
|
275
|
+
}).catch(() => null); // best-effort: local callback listener is optional; null falls back to manual redirect
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
if (listener) {
|
|
279
279
|
activeConfig = { ...activeConfig, redirectUri: listener.redirectUri };
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
-
const started = manager.beginOAuthLogin(provider, activeConfig);
|
|
282
|
+
const started = await manager.beginOAuthLogin(provider, activeConfig);
|
|
283
283
|
if (listener) {
|
|
284
284
|
listener.setExpectedState(started.pending.state);
|
|
285
285
|
}
|
package/src/input/handler.ts
CHANGED
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
} from './handler-picker-routes.ts';
|
|
82
82
|
import { handleGlobalShortcutToken } from './handler-shortcuts.ts';
|
|
83
83
|
import { feedInputTokens } from './handler-feed.ts';
|
|
84
|
-
import { buildInitialFeedContext } from './feed-context-factory.ts';
|
|
84
|
+
import { buildInitialFeedContext, syncFeedContextMutableFields } from './feed-context-factory.ts';
|
|
85
85
|
import { handlePanelIntegrationAction as runPanelIntegrationAction } from './panel-integration-actions.ts';
|
|
86
86
|
import type { Panel } from '../panels/types.ts';
|
|
87
87
|
import type { UiRuntimeServices } from '../runtime/ui-services.ts';
|
|
@@ -292,15 +292,13 @@ export class InputHandler {
|
|
|
292
292
|
|
|
293
293
|
/** Sync mutable handler fields back into feedContext after in-feed mutations. */
|
|
294
294
|
private syncFeedContextMutableFields(): void {
|
|
295
|
-
const
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
ctx.nextPasteId = this.nextPasteId; ctx.nextImageId = this.nextImageId;
|
|
303
|
-
ctx.mouseDownRow = this.mouseDownRow; ctx.mouseDownCol = this.mouseDownCol;
|
|
295
|
+
const h = this;
|
|
296
|
+
syncFeedContextMutableFields({ prompt: h.prompt, cursorPos: h.cursorPos, commandMode: h.commandMode,
|
|
297
|
+
panelFocused: h.panelFocused, indicatorFocused: h.indicatorFocused, helpOverlayActive: h.helpOverlayActive,
|
|
298
|
+
helpScrollOffset: h.helpScrollOffset, shortcutsOverlayActive: h.shortcutsOverlayActive,
|
|
299
|
+
shortcutsScrollOffset: h.shortcutsScrollOffset, selectionCallback: h.selectionCallback,
|
|
300
|
+
nextPasteId: h.nextPasteId, nextImageId: h.nextImageId, mouseDownRow: h.mouseDownRow,
|
|
301
|
+
mouseDownCol: h.mouseDownCol, contentWidth: h.contentWidth }, this.feedContext);
|
|
304
302
|
}
|
|
305
303
|
|
|
306
304
|
/** Wire in the InputHistory instance. Optional; disables history navigation if unset. */
|
|
@@ -99,6 +99,8 @@ export interface PickerItem {
|
|
|
99
99
|
isFree?: boolean;
|
|
100
100
|
/** True when this provider item has a configured API key. */
|
|
101
101
|
isConfigured?: boolean;
|
|
102
|
+
/** How the provider is configured — shown as a badge in provider mode. */
|
|
103
|
+
configuredVia?: 'env' | 'secrets' | 'subscription' | 'anonymous';
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
/** Provider IDs treated as "Popular" in the provider picker. */
|
|
@@ -166,6 +168,8 @@ export class ModelPickerModal {
|
|
|
166
168
|
public availableOnly = true;
|
|
167
169
|
/** Set of provider names that have a configured key (used for availableOnly filter). */
|
|
168
170
|
public configuredProviders: Set<string> = new Set();
|
|
171
|
+
/** How each provider is configured — drives badge display in provider mode. */
|
|
172
|
+
public configuredViaMap: Map<string, 'env' | 'secrets' | 'subscription' | 'anonymous'> = new Map();
|
|
169
173
|
/** IDs of pinned/favorite models — shown at top of list. */
|
|
170
174
|
public pinnedIds: Set<string> = new Set();
|
|
171
175
|
/** IDs of recently used models — shown after pinned, before the rest. */
|
|
@@ -612,13 +616,13 @@ export class ModelPickerModal {
|
|
|
612
616
|
if (filteredPopular.length > 0) {
|
|
613
617
|
providerItems.push({ id: '__header__popular', label: 'Popular', isGroupHeader: true });
|
|
614
618
|
for (const p of filteredPopular) {
|
|
615
|
-
providerItems.push({ id: p, label: p, isConfigured: this.configuredProviders.has(p) });
|
|
619
|
+
providerItems.push({ id: p, label: p, isConfigured: this.configuredProviders.has(p), configuredVia: this.configuredViaMap.get(p) });
|
|
616
620
|
}
|
|
617
621
|
}
|
|
618
622
|
if (filteredAll.length > 0) {
|
|
619
623
|
providerItems.push({ id: '__header__all', label: 'All Providers', isGroupHeader: true });
|
|
620
624
|
for (const p of filteredAll) {
|
|
621
|
-
providerItems.push({ id: p, label: p, isConfigured: this.configuredProviders.has(p) });
|
|
625
|
+
providerItems.push({ id: p, label: p, isConfigured: this.configuredProviders.has(p), configuredVia: this.configuredViaMap.get(p) });
|
|
622
626
|
}
|
|
623
627
|
}
|
|
624
628
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CommandContext } from './command-registry.ts';
|
|
2
|
+
import { logger } from '@pellux/goodvibes-sdk/platform/utils/logger';
|
|
2
3
|
import type { Panel } from '../panels/types.ts';
|
|
3
4
|
import type { PanelManager } from '../panels/panel-manager.ts';
|
|
4
5
|
import { FileExplorerPanel } from '../panels/file-explorer-panel.ts';
|
|
@@ -69,7 +70,7 @@ export function handlePanelIntegrationAction(
|
|
|
69
70
|
const parts = command.replace(/^\//, '').split(/\s+/).filter(Boolean);
|
|
70
71
|
const [name, ...args] = parts;
|
|
71
72
|
if (!name) return false;
|
|
72
|
-
void commandContext.executeCommand(name, args).catch(() => {});
|
|
73
|
+
void commandContext.executeCommand(name, args).catch((err) => { logger.debug('approval panel command dispatch failed', { err }); });
|
|
73
74
|
return true;
|
|
74
75
|
}
|
|
75
76
|
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ConfigSetting } from '@pellux/goodvibes-sdk/platform/config/schema';
|
|
2
|
+
import type { ProviderAuthFreshness, ProviderAuthRoute } from '@pellux/goodvibes-sdk/platform/runtime/provider-accounts/registry';
|
|
3
|
+
import type { FeatureFlag, FlagState } from '@pellux/goodvibes-sdk/platform/runtime/feature-flags/types';
|
|
4
|
+
|
|
5
|
+
export type SettingsCategory = 'display' | 'ui' | 'provider' | 'subscriptions' | 'behavior' | 'storage' | 'permissions' | 'mcp' | 'sandbox' | 'danger' | 'tools' | 'flags' | 'network';
|
|
6
|
+
|
|
7
|
+
export const SETTINGS_CATEGORIES: SettingsCategory[] = [
|
|
8
|
+
'display',
|
|
9
|
+
'ui',
|
|
10
|
+
'provider',
|
|
11
|
+
'subscriptions',
|
|
12
|
+
'behavior',
|
|
13
|
+
'storage',
|
|
14
|
+
'permissions',
|
|
15
|
+
'mcp',
|
|
16
|
+
'sandbox',
|
|
17
|
+
'danger',
|
|
18
|
+
'tools',
|
|
19
|
+
'flags',
|
|
20
|
+
'network',
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
export interface SettingEntry {
|
|
24
|
+
setting: ConfigSetting;
|
|
25
|
+
currentValue: unknown;
|
|
26
|
+
isDefault: boolean;
|
|
27
|
+
effectiveSource?: 'default' | 'local' | 'synced' | 'managed';
|
|
28
|
+
locked?: boolean;
|
|
29
|
+
conflict?: boolean;
|
|
30
|
+
sourceLabel?: string;
|
|
31
|
+
lockReason?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface FlagEntry {
|
|
35
|
+
flag: FeatureFlag;
|
|
36
|
+
state: FlagState;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface McpEntry {
|
|
40
|
+
name: string;
|
|
41
|
+
connected: boolean;
|
|
42
|
+
role: 'general' | 'docs' | 'filesystem' | 'git' | 'database' | 'browser' | 'automation' | 'ops' | 'remote';
|
|
43
|
+
trustMode: 'constrained' | 'ask-on-risk' | 'allow-all' | 'blocked';
|
|
44
|
+
allowedPaths: string[];
|
|
45
|
+
allowedHosts: string[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SubscriptionEntry {
|
|
49
|
+
provider: string;
|
|
50
|
+
state: 'active' | 'pending' | 'available';
|
|
51
|
+
tokenType?: string;
|
|
52
|
+
expiresAt?: number;
|
|
53
|
+
oauthConfigured: boolean;
|
|
54
|
+
activeRoute?: ProviderAuthRoute;
|
|
55
|
+
preferredRoute?: ProviderAuthRoute;
|
|
56
|
+
authFreshness?: ProviderAuthFreshness;
|
|
57
|
+
routeReason?: string;
|
|
58
|
+
issues?: string[];
|
|
59
|
+
nextActions?: string[];
|
|
60
|
+
}
|