@pellux/goodvibes-tui 0.19.23 → 0.19.25
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 +21 -0
- package/README.md +5 -5
- package/bin/goodvibes +5 -0
- package/bin/goodvibes-daemon +5 -0
- package/docs/foundation-artifacts/operator-contract.json +1 -1
- package/package.json +2 -2
- package/src/cli/completion.ts +89 -0
- package/src/cli/config-overrides.ts +159 -0
- package/src/cli/endpoints.ts +63 -0
- package/src/cli/entrypoint.ts +155 -0
- package/src/cli/help.ts +122 -0
- package/src/cli/index.ts +8 -0
- package/src/cli/management-commands.ts +576 -0
- package/src/cli/management.ts +693 -0
- package/src/cli/parser.ts +367 -0
- package/src/cli/status.ts +112 -0
- package/src/cli/tui-startup.ts +32 -0
- package/src/cli/types.ts +63 -0
- package/src/cli-flags.ts +17 -55
- package/src/config/index.ts +1 -1
- package/src/config/secrets.ts +44 -0
- package/src/core/conversation.ts +36 -13
- package/src/daemon/cli.ts +62 -11
- package/src/input/command-registry.ts +3 -0
- package/src/input/commands/guidance-runtime.ts +9 -4
- package/src/input/commands/local-runtime.ts +21 -7
- package/src/input/commands/local-setup.ts +31 -38
- package/src/input/commands/onboarding-runtime.ts +14 -0
- package/src/input/commands/runtime-services.ts +9 -0
- package/src/input/commands.ts +2 -0
- package/src/input/feed-context-factory.ts +8 -1
- package/src/input/handler-feed.ts +13 -8
- package/src/input/handler-interactions.ts +266 -0
- package/src/input/handler-modal-stack.ts +23 -3
- package/src/input/handler-modal-token-routes.ts +23 -1
- package/src/input/handler-onboarding.ts +696 -0
- package/src/input/handler-picker-routes.ts +15 -7
- package/src/input/handler-ui-state.ts +58 -0
- package/src/input/handler.ts +120 -246
- package/src/input/onboarding/handler-onboarding-routes.ts +105 -0
- package/src/input/onboarding/onboarding-wizard-apply.ts +211 -0
- package/src/input/onboarding/onboarding-wizard-constants.ts +148 -0
- package/src/input/onboarding/onboarding-wizard-external-surfaces.ts +712 -0
- package/src/input/onboarding/onboarding-wizard-helpers.ts +218 -0
- package/src/input/onboarding/onboarding-wizard-rules.ts +224 -0
- package/src/input/onboarding/onboarding-wizard-state.ts +354 -0
- package/src/input/onboarding/onboarding-wizard-steps.ts +642 -0
- package/src/input/onboarding/onboarding-wizard-types.ts +170 -0
- package/src/input/onboarding/onboarding-wizard.ts +594 -0
- package/src/main.ts +32 -39
- package/src/panels/builtin/operations.ts +0 -10
- package/src/panels/index.ts +0 -1
- package/src/panels/panel-manager.ts +6 -2
- package/src/renderer/conversation-overlays.ts +6 -0
- package/src/renderer/help-overlay.ts +1 -1
- package/src/renderer/onboarding/onboarding-wizard.ts +533 -0
- package/src/renderer/panel-composite.ts +42 -5
- package/src/renderer/panel-workspace-bar.ts +5 -1
- package/src/runtime/bootstrap-core.ts +1 -0
- package/src/runtime/bootstrap.ts +123 -0
- package/src/runtime/onboarding/apply.ts +685 -0
- package/src/runtime/onboarding/derivation.ts +495 -0
- package/src/runtime/onboarding/index.ts +7 -0
- package/src/runtime/onboarding/markers.ts +161 -0
- package/src/runtime/onboarding/snapshot.ts +400 -0
- package/src/runtime/onboarding/state.ts +140 -0
- package/src/runtime/onboarding/types.ts +402 -0
- package/src/runtime/onboarding/verify.ts +233 -0
- package/src/runtime/ui-services.ts +16 -0
- package/src/shell/ui-openers.ts +12 -2
- package/src/version.ts +1 -1
- package/src/panels/welcome-panel.ts +0 -64
|
@@ -15,6 +15,7 @@ type ModelPickerRouteState = {
|
|
|
15
15
|
getViewportHeight: () => number;
|
|
16
16
|
requestRender: () => void;
|
|
17
17
|
handleEscape: () => void;
|
|
18
|
+
onModelPickerCommit?: () => boolean;
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
export function handleModelPickerToken(state: ModelPickerRouteState, token: InputToken): boolean {
|
|
@@ -58,11 +59,14 @@ export function handleModelPickerToken(state: ModelPickerRouteState, token: Inpu
|
|
|
58
59
|
state.modelPicker.showEffortPicker(selected, currentEffort);
|
|
59
60
|
} else {
|
|
60
61
|
const target = state.modelPicker.target;
|
|
61
|
-
state.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
const handled = state.onModelPickerCommit?.() ?? false;
|
|
63
|
+
if (!handled) {
|
|
64
|
+
state.commandContext?.completeModelSelection?.({
|
|
65
|
+
model: selected,
|
|
66
|
+
effort: currentEffort,
|
|
67
|
+
target,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
66
70
|
state.modelPicker.close();
|
|
67
71
|
if (state.modalStack[state.modalStack.length - 1] === 'modelPicker') state.modalStack.pop();
|
|
68
72
|
}
|
|
@@ -78,7 +82,10 @@ export function handleModelPickerToken(state: ModelPickerRouteState, token: Inpu
|
|
|
78
82
|
} else if (mode === 'effort') {
|
|
79
83
|
const model = state.modelPicker.pendingModel;
|
|
80
84
|
const effort = state.modelPicker.effortLevels[idx];
|
|
81
|
-
if (model && effort)
|
|
85
|
+
if (model && effort) {
|
|
86
|
+
const handled = state.onModelPickerCommit?.() ?? false;
|
|
87
|
+
if (!handled) state.commandContext?.completeModelSelection?.({ model, effort, target: state.modelPicker.target });
|
|
88
|
+
}
|
|
82
89
|
state.modelPicker.close();
|
|
83
90
|
if (state.modalStack[state.modalStack.length - 1] === 'modelPicker') state.modalStack.pop();
|
|
84
91
|
} else if (mode === 'contextCap') {
|
|
@@ -88,7 +95,8 @@ export function handleModelPickerToken(state: ModelPickerRouteState, token: Inpu
|
|
|
88
95
|
const parsedCap = rawInput.length > 0 ? parseInt(rawInput, 10) : null;
|
|
89
96
|
const validCap = parsedCap !== null && parsedCap > 0 && parsedCap <= 10_000_000 ? parsedCap : null;
|
|
90
97
|
const effort = state.commandContext?.session.runtime.reasoningEffort ?? 'medium';
|
|
91
|
-
state.
|
|
98
|
+
const handled = state.onModelPickerCommit?.() ?? false;
|
|
99
|
+
if (!handled) state.commandContext?.completeModelSelection?.({ model: capModel, effort, contextCap: validCap, target: state.modelPicker.target });
|
|
92
100
|
}
|
|
93
101
|
state.modelPicker.close();
|
|
94
102
|
if (state.modalStack[state.modalStack.length - 1] === 'modelPicker') state.modalStack.pop();
|
|
@@ -2,6 +2,54 @@ import type { InputToken } from '@pellux/goodvibes-sdk/platform/core/tokenizer';
|
|
|
2
2
|
import type { InfiniteBuffer } from '../core/history.ts';
|
|
3
3
|
import type { SearchManager } from './search.ts';
|
|
4
4
|
import type { HistorySearch } from './input-history.ts';
|
|
5
|
+
import type {
|
|
6
|
+
OnboardingWizardController,
|
|
7
|
+
OnboardingWizardMode,
|
|
8
|
+
OnboardingWizardSnapshot,
|
|
9
|
+
} from './onboarding/onboarding-wizard.ts';
|
|
10
|
+
export type { OnboardingWizardSnapshot } from './onboarding/onboarding-wizard.ts';
|
|
11
|
+
|
|
12
|
+
export interface OpenOnboardingWizardOptions {
|
|
13
|
+
readonly mode?: OnboardingWizardMode;
|
|
14
|
+
readonly reset?: boolean;
|
|
15
|
+
readonly preload?: OnboardingWizardSnapshot | ((wizard: OnboardingWizardController) => void);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function captureOnboardingWizardSnapshot(
|
|
19
|
+
wizard: OnboardingWizardController,
|
|
20
|
+
): OnboardingWizardSnapshot {
|
|
21
|
+
return wizard.captureSnapshot();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function restoreOnboardingWizardSnapshot(
|
|
25
|
+
wizard: OnboardingWizardController,
|
|
26
|
+
snapshot: OnboardingWizardSnapshot,
|
|
27
|
+
options?: { active?: boolean },
|
|
28
|
+
): void {
|
|
29
|
+
wizard.restoreSnapshot(snapshot, options);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function openOnboardingWizardState(
|
|
33
|
+
wizard: OnboardingWizardController,
|
|
34
|
+
options: OpenOnboardingWizardOptions = {},
|
|
35
|
+
): void {
|
|
36
|
+
const snapshot = typeof options.preload === 'function' ? null : options.preload;
|
|
37
|
+
const nextMode = options.mode ?? snapshot?.mode ?? wizard.mode;
|
|
38
|
+
const shouldReset = options.reset ?? !wizard.active;
|
|
39
|
+
|
|
40
|
+
if (shouldReset) {
|
|
41
|
+
wizard.open(nextMode);
|
|
42
|
+
} else {
|
|
43
|
+
wizard.reopen();
|
|
44
|
+
if (options.mode !== undefined) wizard.setMode(options.mode);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (typeof options.preload === 'function') {
|
|
48
|
+
options.preload(wizard);
|
|
49
|
+
} else if (snapshot) {
|
|
50
|
+
restoreOnboardingWizardSnapshot(wizard, snapshot, { active: true });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
5
53
|
|
|
6
54
|
export type ActiveModalState = {
|
|
7
55
|
helpOverlayActive: boolean;
|
|
@@ -18,6 +66,7 @@ export type ActiveModalState = {
|
|
|
18
66
|
filePicker: { active: boolean; close: () => void };
|
|
19
67
|
blockActionsMenu: { active: boolean; close: () => void };
|
|
20
68
|
selectionModal: { active: boolean; close: () => void };
|
|
69
|
+
onboardingWizard?: Pick<OnboardingWizardController, 'active' | 'close' | 'reopen'>;
|
|
21
70
|
commandMode: boolean;
|
|
22
71
|
};
|
|
23
72
|
|
|
@@ -36,6 +85,7 @@ export function getActiveModalName(state: ActiveModalState): string | null {
|
|
|
36
85
|
if (state.filePicker.active) return 'filePicker';
|
|
37
86
|
if (state.blockActionsMenu.active) return 'blockActions';
|
|
38
87
|
if (state.selectionModal.active) return 'selection';
|
|
88
|
+
if (state.onboardingWizard?.active) return 'onboarding';
|
|
39
89
|
if (state.commandMode) return 'command';
|
|
40
90
|
return null;
|
|
41
91
|
}
|
|
@@ -55,6 +105,7 @@ export type ModalCloseOps = {
|
|
|
55
105
|
closeFilePicker: () => void;
|
|
56
106
|
closeBlockActions: () => void;
|
|
57
107
|
closeSelection: () => void;
|
|
108
|
+
closeOnboarding?: () => void;
|
|
58
109
|
closeCommandMode: () => void;
|
|
59
110
|
};
|
|
60
111
|
|
|
@@ -102,6 +153,9 @@ export function closeModalByName(name: string, ops: ModalCloseOps): void {
|
|
|
102
153
|
case 'selection':
|
|
103
154
|
ops.closeSelection();
|
|
104
155
|
break;
|
|
156
|
+
case 'onboarding':
|
|
157
|
+
ops.closeOnboarding?.();
|
|
158
|
+
break;
|
|
105
159
|
case 'command':
|
|
106
160
|
ops.closeCommandMode();
|
|
107
161
|
break;
|
|
@@ -114,6 +168,7 @@ export type ModalOpenOps = {
|
|
|
114
168
|
openBookmark: () => void;
|
|
115
169
|
openProcess: () => void;
|
|
116
170
|
openContextInspector: () => void;
|
|
171
|
+
openOnboarding?: () => void;
|
|
117
172
|
openCommandMode: () => void;
|
|
118
173
|
};
|
|
119
174
|
|
|
@@ -134,6 +189,9 @@ export function reopenModalByName(name: string, ops: ModalOpenOps): void {
|
|
|
134
189
|
case 'contextInspector':
|
|
135
190
|
ops.openContextInspector();
|
|
136
191
|
break;
|
|
192
|
+
case 'onboarding':
|
|
193
|
+
ops.openOnboarding?.();
|
|
194
|
+
break;
|
|
137
195
|
case 'command':
|
|
138
196
|
ops.openCommandMode();
|
|
139
197
|
break;
|