okai 0.0.18 → 0.0.20

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.
Files changed (2) hide show
  1. package/dist/index.js +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -151,11 +151,11 @@ export async function cli(cmdArgs) {
151
151
  console.log(`Unknown Command: ${command.script} ${command.unknown.join(' ')}\n`);
152
152
  }
153
153
  console.log(`Usage:
154
- ${script} <prompt> Generate new TypeScript Data Models, C# APIs and Migrations from prompt
154
+ ${script} <prompt> Generate new TypeScript Data Models, C# APIs and Migrations from prompt
155
155
  -m, -models <model,> Specify up to 5 LLM models to generate .d.ts Data Models
156
156
  -l, -license <LC-xxx> Specify valid license certificate or key to use premium models
157
157
 
158
- ${script} <models>.d.ts Regenerate C# *.cs files for Data Models defined in the TypeScript .d.ts file
158
+ ${script} <models>.d.ts Regenerate C# *.cs files for Data Models defined in the TypeScript .d.ts file
159
159
  -w, -watch Watch for changes to <models>.d.ts and regenerate *.cs on save
160
160
 
161
161
  ${script} rm <models>.d.ts Remove <models>.d.ts and its generated *.cs files
@@ -474,7 +474,7 @@ async function createGistPreview(title, gist) {
474
474
  style: {
475
475
  selected: {
476
476
  bg: 'blue',
477
- fg: 'white'
477
+ fg: 'black'
478
478
  }
479
479
  },
480
480
  keys: true,
@@ -507,7 +507,7 @@ async function createGistPreview(title, gist) {
507
507
  height: 1,
508
508
  content: 'Press (a) accept (q) quit',
509
509
  style: {
510
- fg: 'white',
510
+ fg: 'black',
511
511
  bg: 'blue'
512
512
  }
513
513
  });
@@ -554,6 +554,18 @@ async function createGistPreview(title, gist) {
554
554
  // titleBar.setContent(`DOWN ${maxScroll} = ${contentHeight} - ${boxHeight}; min(${maxScroll}, ${currentScroll} + ${scrollAmount}) => ${newScrollPosition}`)
555
555
  screen.render();
556
556
  }
557
+ // Home key handler (scroll to top)
558
+ if (key.name === 'home') {
559
+ preview.setScroll(0);
560
+ screen.render();
561
+ }
562
+ // End key handler (scroll to bottom)
563
+ if (key.name === 'end') {
564
+ // Calculate max scroll position to show last page of content
565
+ const maxScroll = Math.max(0, contentHeight - boxHeight + 2);
566
+ preview.setScroll(maxScroll);
567
+ screen.render();
568
+ }
557
569
  });
558
570
  // Handle key events
559
571
  screen.key(['q', 'C-c'], () => process.exit(0));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "okai",
3
3
  "type": "module",
4
- "version": "0.0.18",
4
+ "version": "0.0.20",
5
5
  "bin": "./dist/okai.js",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",