bingocode 1.1.101 → 1.1.102

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bingocode",
3
- "version": "1.1.101",
3
+ "version": "1.1.102",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "claude": "bin/claude-win.cjs",
@@ -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 || 9);
77
- const TOP_H_COMPACT = Number(process.env.CLI_TOP_H_COMPACT || 6);
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 [listOffset, setListOffset] = useState(0);
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
- setListOffset(0);
620
+ setHistoryHighlightIndex(0);
628
621
  return;
629
622
  }
630
623
  if (input === 'j' && historyHasMore) {
631
624
  setHistoryCursor(historyList[historyList.length - 1]?.id || null);
632
- setListOffset(0);
625
+ setHistoryHighlightIndex(0);
633
626
  return;
634
627
  }
635
628
  if (input === 'k') {
636
629
  setHistoryCursor(null);
637
- setListOffset(0);
630
+ setHistoryHighlightIndex(0);
638
631
  return;
639
632
  }
640
633
  } else if (historyMenuStage === 'window') {
@@ -934,12 +927,23 @@ export const CliMenuManager: React.FC = () => {
934
927
  // Home: WelcomeV2 (58 cols wide)
935
928
  if (page === null) {
936
929
  const WELCOME_W = 58;
937
- const leftPad = Math.max(0, Math.floor((VIEW_W - WELCOME_W) / 2));
938
930
  return (
939
931
  <Box flexDirection="column" width={VIEW_W} height={MID_H}>
940
932
  <Box flexDirection="row" width={VIEW_W} flexGrow={1}>
941
- <Box width={leftPad} flexShrink={0} />
942
- <WelcomeV2 />
933
+ <Box paddingX={2}>
934
+ <WelcomeV2 />
935
+ </Box>
936
+ <Box flexGrow={1} flexDirection="column" alignItems="flex-end" paddingRight={4} paddingTop={1}>
937
+ <Box borderStyle="classic" borderColor="gray" paddingX={1} flexDirection="column">
938
+ <Text color="cyan" bold>Version Info</Text>
939
+ <Text> </Text>
940
+ <Text dimColor>v1.1.101</Text>
941
+ <Text dimColor>Stable Release</Text>
942
+ <Text> </Text>
943
+ <Text color="gray">Arch: {process.arch}</Text>
944
+ <Text color="gray">Node: {process.version}</Text>
945
+ </Box>
946
+ </Box>
943
947
  </Box>
944
948
  {!apiUrl && !bootErr && (
945
949
  <StateDisplay type="loading" message="Starting server..." />
@@ -1145,16 +1149,21 @@ export const CliMenuManager: React.FC = () => {
1145
1149
 
1146
1150
  // About
1147
1151
  if (page === 'about') {
1152
+ const i18n = i18nMap[lang] as any;
1148
1153
  return (
1149
- <Box width={VIEW_W} height={MID_H} flexDirection="column">
1150
- <Text color="cyan" bold>{i18nMap[lang].about}</Text>
1151
- <Box marginTop={1} flexDirection="column">
1152
- <Text>{(i18nMap[lang] as any).aboutContent}</Text>
1154
+ <Box width={VIEW_W} height={MID_H} flexDirection="column" paddingX={1}>
1155
+ <Box flexGrow={1} flexDirection="column">
1156
+ <Text color="cyan" bold>{i18n.about}</Text>
1157
+ <Box marginTop={1} flexDirection="column">
1158
+ <Text>{i18n.aboutContent}</Text>
1159
+ </Box>
1160
+ <Box marginTop={1}>
1161
+ <Hint>API Base: {apiUrl}</Hint>
1162
+ </Box>
1153
1163
  </Box>
1154
- <Box marginTop={1}>
1155
- <Hint>
1156
- API Base: {apiUrl}
1157
- </Hint>
1164
+ <Box borderStyle="classic" borderColor="gray" paddingX={1} flexDirection="column" marginTop={1}>
1165
+ <Text dimColor size="small">{i18n.author}</Text>
1166
+ <Text dimColor size="small">{i18n.github}</Text>
1158
1167
  </Box>
1159
1168
  </Box>
1160
1169
  );
@@ -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
- <Panel width={width} height={height} borderStyle="round" paddingX={1} paddingY={0}>
271
- <Box width={width - 2} flexDirection="row" justifyContent="space-between" alignItems="center">
272
- <Box>
273
- {ready ? (page === null ? homeLogo : compactLogo) : <FallbackTop ip={ip} />}
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
- {toolbar ? <Box>{toolbar}</Box> : <Box><Hint dim>{ready ? '' : '…'}</Hint></Box>}
276
- </Box>
277
- </Panel>
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(({