@pellux/goodvibes-agent 1.0.37 → 1.0.39

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.
@@ -0,0 +1,40 @@
1
+ import type { InputHandler } from '../input/handler.ts';
2
+ import type { CompositeRequest } from '../renderer/compositor.ts';
3
+ import { renderModelWorkspace } from '../renderer/model-workspace.ts';
4
+ import { renderOnboardingWizard } from '../renderer/onboarding/onboarding-wizard.ts';
5
+ import { type Line, createEmptyLine } from '../types/grid.ts';
6
+
7
+ function normalizeFullscreenViewport(lines: readonly Line[], width: number, height: number): Line[] {
8
+ const viewport = lines.slice(0, height).map((line) => {
9
+ if (line.length === width) return line;
10
+ const next = createEmptyLine(width);
11
+ for (let index = 0; index < Math.min(width, line.length); index += 1) {
12
+ next[index] = { ...line[index]! };
13
+ }
14
+ return next;
15
+ });
16
+ while (viewport.length < height) viewport.push(createEmptyLine(width));
17
+ return viewport;
18
+ }
19
+
20
+ export function createOnboardingFullscreenComposite(
21
+ input: InputHandler,
22
+ width: number,
23
+ height: number,
24
+ ): CompositeRequest {
25
+ const viewport = normalizeFullscreenViewport(
26
+ input.modelPicker.active
27
+ ? renderModelWorkspace(input.modelPicker, width, height)
28
+ : renderOnboardingWizard(input.onboardingWizard, width, height),
29
+ width,
30
+ height,
31
+ );
32
+ return {
33
+ width,
34
+ height,
35
+ header: [],
36
+ viewport,
37
+ footer: [],
38
+ panelWidth: 0,
39
+ };
40
+ }
package/src/version.ts CHANGED
@@ -6,7 +6,7 @@ import { join } from 'node:path';
6
6
  // The prebuild script updates the fallback value before compilation.
7
7
  // Uses import.meta.dir (Bun) to locate package.json relative to this file,
8
8
  // which is correct regardless of the process working directory.
9
- let _version = '1.0.37';
9
+ let _version = '1.0.39';
10
10
  try {
11
11
  const pkg = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf-8')) as {
12
12
  readonly version?: unknown;