openaxies 0.3.0 → 0.5.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.
@@ -1,98 +0,0 @@
1
- import React from 'react';
2
- import { Box, Text } from 'ink';
3
- import { hex } from '../config/theme.js';
4
-
5
- const h = React.createElement;
6
-
7
- export const ROUTER_HEIGHT = 2;
8
-
9
- function checkActiveModel(modelId) {
10
- if (typeof modelId !== 'string') {
11
- return 'openaxis/openaxis-mixtral';
12
- }
13
- return modelId;
14
- }
15
-
16
- function checkColumns(cols) {
17
- if (typeof cols !== 'number' || cols < 1) {
18
- return 80;
19
- }
20
- return cols;
21
- }
22
-
23
- function buildSeparator(cols) {
24
- const safeCols = checkColumns(cols);
25
- let line = '';
26
- for (let i = 0; i < safeCols; i++) {
27
- line = line + '\u2500';
28
- }
29
- return line;
30
- }
31
-
32
- // RouterBar — 2 rows:
33
- // Row 1: model status with active/standby indicators
34
- // Row 2: full-width separator line
35
- export function createRouterBar(activeModel, cols) {
36
- const modelStr = checkActiveModel(activeModel);
37
- const isMixtral = modelStr === 'openaxis/openaxis-mixtral';
38
- const sepLine = buildSeparator(cols);
39
-
40
- return h(Box, {
41
- flexDirection: 'column',
42
- width: '100%',
43
- height: ROUTER_HEIGHT,
44
- backgroundColor: hex.black,
45
- paddingLeft: 1,
46
- paddingRight: 1,
47
- flexShrink: 0,
48
- },
49
- h(Box, {
50
- height: 1,
51
- flexDirection: 'row',
52
- alignItems: 'center',
53
- },
54
-
55
- // ── Mixtral slot ──
56
- h(Text, {
57
- color: isMixtral ? hex.neonBlue : '#333355',
58
- bold: isMixtral,
59
- }, isMixtral ? '\u25B6 ' : '\u25B7 '),
60
- h(Text, {
61
- color: isMixtral ? hex.primary : '#444466',
62
- bold: isMixtral,
63
- }, 'Mixtral'),
64
- h(Text, {
65
- color: isMixtral ? hex.greenOnline : '#2A3A2A',
66
- }, ' \u25CF '),
67
- h(Text, {
68
- color: isMixtral ? hex.greenOnline : '#2A3A2A',
69
- dimColor: !isMixtral,
70
- }, isMixtral ? 'ACTIVE' : 'STANDBY'),
71
-
72
- // ── Divider ──
73
- h(Text, { color: '#1E1E2E' }, ' \u2502 '),
74
-
75
- // ── Heavy slot ──
76
- h(Text, {
77
- color: !isMixtral ? hex.neonBlue : '#333355',
78
- bold: !isMixtral,
79
- }, !isMixtral ? '\u25B6 ' : '\u25B7 '),
80
- h(Text, {
81
- color: !isMixtral ? hex.primary : '#444466',
82
- bold: !isMixtral,
83
- }, 'Heavy'),
84
- h(Text, {
85
- color: !isMixtral ? hex.greenOnline : '#2A3A2A',
86
- }, ' \u25CF '),
87
- h(Text, {
88
- color: !isMixtral ? hex.greenOnline : '#2A3A2A',
89
- dimColor: isMixtral,
90
- }, !isMixtral ? 'ACTIVE' : 'STANDBY'),
91
-
92
- // ── Right-side hint ──
93
- h(Text, { color: '#1E1E2E' }, ' \u2502 '),
94
- h(Text, { color: '#2A2A40' }, '/model to switch'),
95
- ),
96
- h(Text, { color: '#1A1A28' }, sepLine)
97
- );
98
- }