bingocode 1.1.101 → 1.1.103
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/package.json +1 -1
- package/src/manager/CliMenuManager.tsx +30 -30
- package/src/manager/CliMenuUi.tsx +29 -9
package/package.json
CHANGED
|
@@ -73,8 +73,8 @@ async function buildSpawnEnv(): Promise<NodeJS.ProcessEnv> {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
// Top height: Home fits LogoV2 + Toolbar, other pages more compact
|
|
76
|
-
const TOP_H_HOME = Number(process.env.CLI_TOP_H_HOME ||
|
|
77
|
-
const TOP_H_COMPACT = Number(process.env.CLI_TOP_H_COMPACT ||
|
|
76
|
+
const TOP_H_HOME = Number(process.env.CLI_TOP_H_HOME || 10);
|
|
77
|
+
const TOP_H_COMPACT = Number(process.env.CLI_TOP_H_COMPACT || 7);
|
|
78
78
|
// Bottom bar height
|
|
79
79
|
const BOTTOM_H = Number(process.env.CLI_BOTTOM_H || 3);
|
|
80
80
|
|
|
@@ -91,13 +91,13 @@ const i18nMap = {
|
|
|
91
91
|
about: 'Bingo CLI - Version Info & About',
|
|
92
92
|
aboutContent: [
|
|
93
93
|
'Bingo is an AI assistant terminal client.',
|
|
94
|
-
'Author: leanchy (Email: leanchy07@outlook.com)',
|
|
95
|
-
'Github: github.com/leanchy/bingo-claude-code-offline-installer',
|
|
96
94
|
'1. API Config: Press "P" or select "API Config" to set up your keys.',
|
|
97
95
|
'2. Model Slots: Configure specific models in the Provider panel.',
|
|
98
96
|
'3. Background Service: Bingo runs a local server to manage sessions.',
|
|
99
97
|
'4. Start Chat: Run `bingocode` or `claude` in any terminal to start.',
|
|
100
98
|
].join('\n'),
|
|
99
|
+
author: 'Author: leanchy (Email: leanchy07@outlook.com)',
|
|
100
|
+
github: 'Github: github.com/leanchy/bingo-claude-code-offline-installer',
|
|
101
101
|
mark: '→ Mark Session',
|
|
102
102
|
unmark: '→ Unmark Session',
|
|
103
103
|
tipsSimple: 'L Lang | ESC Back | ←→ Menu | ↩ Enter | ? Help',
|
|
@@ -119,13 +119,13 @@ const i18nMap = {
|
|
|
119
119
|
about: 'Bingo CLI Terminal - Version Info & About',
|
|
120
120
|
aboutContent: [
|
|
121
121
|
'Bingo is an AI assistant terminal client.',
|
|
122
|
-
'Author: leanchy (Email: leanchy07@outlook.com)',
|
|
123
|
-
'Github: github.com/leanchy/bingo-claude-code-offline-installer',
|
|
124
122
|
'1. API Config: Press "P" or select "API Config" to set up your keys.',
|
|
125
123
|
'2. Model Slots: Configure specific models in the Provider panel.',
|
|
126
124
|
'3. Background Service: Bingo runs a local server to manage sessions.',
|
|
127
125
|
'4. Start Chat: Run `bingocode` or `claude` in any terminal to start.',
|
|
128
126
|
].join('\n'),
|
|
127
|
+
author: 'Author: leanchy (Email: leanchy07@outlook.com)',
|
|
128
|
+
github: 'Github: github.com/leanchy/bingo-claude-code-offline-installer',
|
|
129
129
|
mark: '→ Mark Session',
|
|
130
130
|
unmark: '→ Unmark Session',
|
|
131
131
|
tipsSimple: 'L Lang | ESC Back | ←→ Menu | ↩ Enter | ? Help',
|
|
@@ -305,7 +305,7 @@ export const CliMenuManager: React.FC = () => {
|
|
|
305
305
|
const [showHelp, setShowHelp] = useState(false);
|
|
306
306
|
|
|
307
307
|
// Keyboard navigation for lists
|
|
308
|
-
const [
|
|
308
|
+
const [historyHighlightIndex, setHistoryHighlightIndex] = useState(0);
|
|
309
309
|
|
|
310
310
|
// Quick Resume (R)
|
|
311
311
|
const [quickResumeRequested, setQuickResumeRequested] = useState(false);
|
|
@@ -571,6 +571,7 @@ export const CliMenuManager: React.FC = () => {
|
|
|
571
571
|
setHistoryCursor(null);
|
|
572
572
|
setSessionMessages([]);
|
|
573
573
|
setMsgsPage(0);
|
|
574
|
+
setHistoryHighlightIndex(0);
|
|
574
575
|
setSettingsOffset(0);
|
|
575
576
|
return;
|
|
576
577
|
}
|
|
@@ -611,30 +612,22 @@ export const CliMenuManager: React.FC = () => {
|
|
|
611
612
|
// History shortcuts
|
|
612
613
|
if (!showHelp && page === 'history') {
|
|
613
614
|
if (historyMenuStage === 'list') {
|
|
614
|
-
const HIST_VISIBLE = MID_H - 2;
|
|
615
|
-
if (key.downArrow || input === 'j' || input === '\u001b[B') {
|
|
616
|
-
// Internal SelectInput handles cursor, we just need to track offset for ScrollBar
|
|
617
|
-
setListOffset(o => Math.min(o + 1, Math.max(0, groupedHistoryItems.length - HIST_VISIBLE)));
|
|
618
|
-
}
|
|
619
|
-
if (key.upArrow || input === 'k' || input === '\u001b[A') {
|
|
620
|
-
setListOffset(o => Math.max(0, o - 1));
|
|
621
|
-
}
|
|
622
615
|
if (input === 'q') {
|
|
623
616
|
setPage(null);
|
|
624
617
|
setHistoryMenuStage('list');
|
|
625
618
|
setSelectedHistory(null);
|
|
626
619
|
setHistoryCursor(null);
|
|
627
|
-
|
|
620
|
+
setHistoryHighlightIndex(0);
|
|
628
621
|
return;
|
|
629
622
|
}
|
|
630
623
|
if (input === 'j' && historyHasMore) {
|
|
631
624
|
setHistoryCursor(historyList[historyList.length - 1]?.id || null);
|
|
632
|
-
|
|
625
|
+
setHistoryHighlightIndex(0);
|
|
633
626
|
return;
|
|
634
627
|
}
|
|
635
628
|
if (input === 'k') {
|
|
636
629
|
setHistoryCursor(null);
|
|
637
|
-
|
|
630
|
+
setHistoryHighlightIndex(0);
|
|
638
631
|
return;
|
|
639
632
|
}
|
|
640
633
|
} else if (historyMenuStage === 'window') {
|
|
@@ -933,13 +926,15 @@ export const CliMenuManager: React.FC = () => {
|
|
|
933
926
|
|
|
934
927
|
// Home: WelcomeV2 (58 cols wide)
|
|
935
928
|
if (page === null) {
|
|
936
|
-
const WELCOME_W = 58;
|
|
937
|
-
const leftPad = Math.max(0, Math.floor((VIEW_W - WELCOME_W) / 2));
|
|
938
929
|
return (
|
|
939
930
|
<Box flexDirection="column" width={VIEW_W} height={MID_H}>
|
|
940
931
|
<Box flexDirection="row" width={VIEW_W} flexGrow={1}>
|
|
941
|
-
<Box
|
|
942
|
-
|
|
932
|
+
<Box paddingX={2}>
|
|
933
|
+
<WelcomeV2 />
|
|
934
|
+
</Box>
|
|
935
|
+
<Box flexGrow={1} flexDirection="column" alignItems="flex-end" paddingRight={4} paddingTop={1}>
|
|
936
|
+
<Text dimColor>v1.1.102</Text>
|
|
937
|
+
</Box>
|
|
943
938
|
</Box>
|
|
944
939
|
{!apiUrl && !bootErr && (
|
|
945
940
|
<StateDisplay type="loading" message="Starting server..." />
|
|
@@ -1145,16 +1140,21 @@ export const CliMenuManager: React.FC = () => {
|
|
|
1145
1140
|
|
|
1146
1141
|
// About
|
|
1147
1142
|
if (page === 'about') {
|
|
1143
|
+
const i18n = i18nMap[lang] as any;
|
|
1148
1144
|
return (
|
|
1149
|
-
<Box width={VIEW_W} height={MID_H} flexDirection="column">
|
|
1150
|
-
<
|
|
1151
|
-
|
|
1152
|
-
<
|
|
1145
|
+
<Box width={VIEW_W} height={MID_H} flexDirection="column" paddingX={1}>
|
|
1146
|
+
<Box flexGrow={1} flexDirection="column">
|
|
1147
|
+
<Text color="cyan" bold>{i18n.about}</Text>
|
|
1148
|
+
<Box marginTop={1} flexDirection="column">
|
|
1149
|
+
<Text>{i18n.aboutContent}</Text>
|
|
1150
|
+
</Box>
|
|
1151
|
+
<Box marginTop={1}>
|
|
1152
|
+
<Hint>API Base: {apiUrl}</Hint>
|
|
1153
|
+
</Box>
|
|
1153
1154
|
</Box>
|
|
1154
|
-
<Box marginTop={1}>
|
|
1155
|
-
<
|
|
1156
|
-
|
|
1157
|
-
</Hint>
|
|
1155
|
+
<Box paddingX={1} flexDirection="column" marginTop={1}>
|
|
1156
|
+
<Text dimColor>{i18n.author}</Text>
|
|
1157
|
+
<Text dimColor>{i18n.github}</Text>
|
|
1158
1158
|
</Box>
|
|
1159
1159
|
</Box>
|
|
1160
1160
|
);
|
|
@@ -266,16 +266,36 @@ export const TopBar: React.FC<{
|
|
|
266
266
|
compactLogo: React.ReactNode;
|
|
267
267
|
toolbar?: React.ReactNode;
|
|
268
268
|
ip?: string;
|
|
269
|
-
}> = memo(({ ready, page, width = 80, height = 5, homeLogo, compactLogo, toolbar, ip }) =>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
269
|
+
}> = memo(({ ready, page, width = 80, height = 5, homeLogo, compactLogo, toolbar, ip }) => {
|
|
270
|
+
const isHome = page === null;
|
|
271
|
+
return (
|
|
272
|
+
<Panel width={width} height={height} borderStyle="round" paddingX={1} paddingY={0}>
|
|
273
|
+
<Box width={width - 4} flexDirection="row" alignItems="flex-start">
|
|
274
|
+
{/* Left Section: Welcome Text & IP */}
|
|
275
|
+
<Box flexDirection="column" width={20} marginRight={2}>
|
|
276
|
+
{isHome ? (
|
|
277
|
+
<Box flexDirection="column">
|
|
278
|
+
<Text bold color="cyan">Welcome Bingo</Text>
|
|
279
|
+
<Text bold color="cyan">Code</Text>
|
|
280
|
+
</Box>
|
|
281
|
+
) : (
|
|
282
|
+
<Text bold color="cyan">Bingo Code</Text>
|
|
283
|
+
)}
|
|
284
|
+
{ip ? (
|
|
285
|
+
<Box marginTop={1}>
|
|
286
|
+
<Text color="gray" dimColor>IP: {ip.replace(':','\n ')}</Text>
|
|
287
|
+
</Box>
|
|
288
|
+
) : null}
|
|
289
|
+
</Box>
|
|
290
|
+
|
|
291
|
+
{/* Center/Right Section: Logo + Toolbar (Dynamic) */}
|
|
292
|
+
<Box flexGrow={1} flexDirection="column">
|
|
293
|
+
{toolbar}
|
|
294
|
+
</Box>
|
|
274
295
|
</Box>
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
));
|
|
296
|
+
</Panel>
|
|
297
|
+
);
|
|
298
|
+
});
|
|
279
299
|
|
|
280
300
|
// InfoPair (Label fixed width for column alignment)
|
|
281
301
|
export const InfoPair: React.FC<{ label: string; value: string; labelColor?: string; valueColor?: string; labelWidth?: number }> = memo(({
|