bingocode 1.1.130 → 1.1.132
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,20 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"permissions": {
|
|
3
3
|
"allow": [
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"Bash(curl -s \"https://docs.anthropic.com/en/api/messages\" --max-time 30 -A \"Mozilla/5.0\")",
|
|
7
|
-
"Bash(curl -s \"https://docs.anthropic.com/en/api/messages-streaming\" --max-time 30 -A \"Mozilla/5.0\")",
|
|
8
|
-
"Bash(curl -sv \"https://docs.anthropic.com/en/api/messages\" --max-time 30)",
|
|
9
|
-
"Bash(curl -sv \"https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/api.md\" --max-time 30)",
|
|
10
|
-
"Bash(curl -s \"https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/refs/heads/main/README.md\" --max-time 30)",
|
|
11
|
-
"Bash(findstr /i goal)",
|
|
12
|
-
"Bash(bun run:*)",
|
|
13
|
-
"Bash(bunx tsc:*)",
|
|
14
|
-
"Bash(node_modules/.bin/tsc --noEmit --skipLibCheck)",
|
|
15
|
-
"WebFetch(domain:www.npmjs.com)",
|
|
16
|
-
"Bash(npm info:*)",
|
|
17
|
-
"Bash(npm pack:*)"
|
|
4
|
+
"Read(//c/Users/qi.lin/.claude/**)",
|
|
5
|
+
"Bash(dir \"F:\\\\Leanchy\\\\VirtuosAgent\\\\BingoCode\\\\src\\\\server\\\\proxy\")"
|
|
18
6
|
]
|
|
19
7
|
}
|
|
20
8
|
}
|
package/package.json
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
//@C:M ID=M.UI.TopToolbar;K=M;V=1.3;P=top toolbar;D=CLI;M=cli;S=ui
|
|
2
|
-
import React, { memo, useMemo } from 'react';
|
|
3
|
-
import { Box, Text } from 'ink';
|
|
4
|
-
import { Chip } from './CliMenuUi.tsx';
|
|
5
|
-
import { useTheme } from '../components/design-system/ThemeProvider.js';
|
|
6
|
-
import { getGlobalConfig } from '../utils/config.ts';
|
|
7
|
-
import type { ClawdPose } from '../components/LogoV2/Clawd.tsx';
|
|
8
|
-
import { Clawd } from '../components/LogoV2/Clawd.tsx';
|
|
9
|
-
import { AnimatedClawd } from '../components/LogoV2/AnimatedClawd.tsx';
|
|
10
|
-
|
|
11
|
-
type Props = {
|
|
12
|
-
ready: boolean;
|
|
13
|
-
page: string | null;
|
|
14
|
-
animEnabled: boolean;
|
|
15
|
-
tipsEnabled: boolean;
|
|
16
|
-
ip?: string;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//@C:F ID=F.UI.TopToolbar;K=F;V=1.4;P=toolbar;D=CLI;M=cli;S=ui;In=Props;Out=JSX.Element
|
|
20
|
-
export const TopToolbar: React.FC<Props> = memo(({ ready, page, animEnabled, tipsEnabled, ip }) => {
|
|
21
|
-
const [theme] = useTheme();
|
|
22
|
-
|
|
23
|
-
const { version } = useMemo(() => {
|
|
24
|
-
try {
|
|
25
|
-
const cfg = getGlobalConfig();
|
|
26
|
-
return { version: (cfg as any)?.version ?? '' };
|
|
27
|
-
} catch {
|
|
28
|
-
return { version: '' };
|
|
29
|
-
}
|
|
30
|
-
}, []);
|
|
31
|
-
|
|
32
|
-
const themeLabel = String(theme || (ready ? (getGlobalConfig()?.theme ?? 'system') : '…'));
|
|
33
|
-
const uiChipValue = `Anim ${animEnabled ? 'On' : 'Off'} · Tips ${tipsEnabled ? 'On' : 'Off'}`;
|
|
34
|
-
const uiTone = (String(theme) === 'dark') ? 'accent' : (String(theme) === 'highContrast' ? 'warning' : 'info');
|
|
35
|
-
|
|
36
|
-
const clawdPose: ClawdPose = useMemo(() => {
|
|
37
|
-
if (!ready) return 'default';
|
|
38
|
-
if (page === null) return animEnabled ? 'arms-up' : 'default';
|
|
39
|
-
return tipsEnabled ? 'look-left' : 'look-right';
|
|
40
|
-
}, [ready, page, animEnabled, tipsEnabled]);
|
|
41
|
-
|
|
42
|
-
// ── Compact mode (page !== null): single line, no logo ──────────────
|
|
43
|
-
if (page !== null) {
|
|
44
|
-
return (
|
|
45
|
-
<Box flexDirection="row" alignItems="center">
|
|
46
|
-
<Text bold>Bingo Code</Text>
|
|
47
|
-
<Box marginLeft={1}>
|
|
48
|
-
<Chip label="Theme" value={themeLabel} tone="accent" />
|
|
49
|
-
</Box>
|
|
50
|
-
<Chip label="UI" value={uiChipValue} tone={uiTone as any} />
|
|
51
|
-
{ip ? (
|
|
52
|
-
<Text color="green" dimColor> · IP: {ip}</Text>
|
|
53
|
-
) : (
|
|
54
|
-
<Text color="yellow" dimColor> · {ready ? 'Server ready' : 'Starting…'}</Text>
|
|
55
|
-
)}
|
|
56
|
-
</Box>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// ── Home mode (page === null): Clawd left + 3-row right column ───────
|
|
61
|
-
return (
|
|
62
|
-
<Box flexDirection="row" alignItems="flex-start">
|
|
63
|
-
{/* Left: Clawd sprite */}
|
|
64
|
-
<Box marginRight={2}>
|
|
65
|
-
{animEnabled ? <AnimatedClawd /> : <Clawd pose={clawdPose} />}
|
|
66
|
-
</Box>
|
|
67
|
-
|
|
68
|
-
{/* Right: 3 rows */}
|
|
69
|
-
<Box flexDirection="column">
|
|
70
|
-
{/* Row 1: brand + version + chips */}
|
|
71
|
-
<Box flexDirection="row" alignItems="center">
|
|
72
|
-
<Text bold>Welcome to Bingo Code</Text>
|
|
73
|
-
{version ? <Text dimColor> v{version}</Text> : null}
|
|
74
|
-
<Box marginLeft={1}>
|
|
75
|
-
<Chip label="Theme" value={themeLabel} tone="accent" />
|
|
76
|
-
</Box>
|
|
77
|
-
<Chip label="UI" value={uiChipValue} tone={uiTone as any} />
|
|
78
|
-
</Box>
|
|
79
|
-
|
|
80
|
-
{/* Row 2: IP / server status */}
|
|
81
|
-
<Box>
|
|
82
|
-
{ip ? (
|
|
83
|
-
<Text color="green" dimColor>IP: {ip}</Text>
|
|
84
|
-
) : (
|
|
85
|
-
<Text color="yellow" dimColor>{ready ? 'Server ready' : 'Starting server…'}</Text>
|
|
86
|
-
)}
|
|
87
|
-
</Box>
|
|
88
|
-
|
|
89
|
-
{/* Row 3: keyboard shortcuts */}
|
|
90
|
-
<Box>
|
|
91
|
-
<Text dimColor>N New · R Resume · P Provider · G Theme · ? Help</Text>
|
|
92
|
-
</Box>
|
|
93
|
-
</Box>
|
|
94
|
-
</Box>
|
|
95
|
-
);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
export default TopToolbar;
|
|
1
|
+
//@C:M ID=M.UI.TopToolbar;K=M;V=1.3;P=top toolbar;D=CLI;M=cli;S=ui
|
|
2
|
+
import React, { memo, useMemo } from 'react';
|
|
3
|
+
import { Box, Text } from 'ink';
|
|
4
|
+
import { Chip } from './CliMenuUi.tsx';
|
|
5
|
+
import { useTheme } from '../components/design-system/ThemeProvider.js';
|
|
6
|
+
import { getGlobalConfig } from '../utils/config.ts';
|
|
7
|
+
import type { ClawdPose } from '../components/LogoV2/Clawd.tsx';
|
|
8
|
+
import { Clawd } from '../components/LogoV2/Clawd.tsx';
|
|
9
|
+
import { AnimatedClawd } from '../components/LogoV2/AnimatedClawd.tsx';
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
ready: boolean;
|
|
13
|
+
page: string | null;
|
|
14
|
+
animEnabled: boolean;
|
|
15
|
+
tipsEnabled: boolean;
|
|
16
|
+
ip?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//@C:F ID=F.UI.TopToolbar;K=F;V=1.4;P=toolbar;D=CLI;M=cli;S=ui;In=Props;Out=JSX.Element
|
|
20
|
+
export const TopToolbar: React.FC<Props> = memo(({ ready, page, animEnabled, tipsEnabled, ip }) => {
|
|
21
|
+
const [theme] = useTheme();
|
|
22
|
+
|
|
23
|
+
const { version } = useMemo(() => {
|
|
24
|
+
try {
|
|
25
|
+
const cfg = getGlobalConfig();
|
|
26
|
+
return { version: (cfg as any)?.version ?? '' };
|
|
27
|
+
} catch {
|
|
28
|
+
return { version: '' };
|
|
29
|
+
}
|
|
30
|
+
}, []);
|
|
31
|
+
|
|
32
|
+
const themeLabel = String(theme || (ready ? (getGlobalConfig()?.theme ?? 'system') : '…'));
|
|
33
|
+
const uiChipValue = `Anim ${animEnabled ? 'On' : 'Off'} · Tips ${tipsEnabled ? 'On' : 'Off'}`;
|
|
34
|
+
const uiTone = (String(theme) === 'dark') ? 'accent' : (String(theme) === 'highContrast' ? 'warning' : 'info');
|
|
35
|
+
|
|
36
|
+
const clawdPose: ClawdPose = useMemo(() => {
|
|
37
|
+
if (!ready) return 'default';
|
|
38
|
+
if (page === null) return animEnabled ? 'arms-up' : 'default';
|
|
39
|
+
return tipsEnabled ? 'look-left' : 'look-right';
|
|
40
|
+
}, [ready, page, animEnabled, tipsEnabled]);
|
|
41
|
+
|
|
42
|
+
// ── Compact mode (page !== null): single line, no logo ──────────────
|
|
43
|
+
if (page !== null) {
|
|
44
|
+
return (
|
|
45
|
+
<Box flexDirection="row" alignItems="center">
|
|
46
|
+
<Text bold>Bingo Code</Text>
|
|
47
|
+
<Box marginLeft={1}>
|
|
48
|
+
<Chip label="Theme" value={themeLabel} tone="accent" />
|
|
49
|
+
</Box>
|
|
50
|
+
<Chip label="UI" value={uiChipValue} tone={uiTone as any} />
|
|
51
|
+
{ip ? (
|
|
52
|
+
<Text color="green" dimColor> · IP: {ip}</Text>
|
|
53
|
+
) : (
|
|
54
|
+
<Text color="yellow" dimColor> · {ready ? 'Server ready' : 'Starting…'}</Text>
|
|
55
|
+
)}
|
|
56
|
+
</Box>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ── Home mode (page === null): Clawd left + 3-row right column ───────
|
|
61
|
+
return (
|
|
62
|
+
<Box flexDirection="row" alignItems="flex-start">
|
|
63
|
+
{/* Left: Clawd sprite */}
|
|
64
|
+
<Box marginRight={2}>
|
|
65
|
+
{animEnabled ? <AnimatedClawd /> : <Clawd pose={clawdPose} />}
|
|
66
|
+
</Box>
|
|
67
|
+
|
|
68
|
+
{/* Right: 3 rows */}
|
|
69
|
+
<Box flexDirection="column">
|
|
70
|
+
{/* Row 1: brand + version + chips */}
|
|
71
|
+
<Box flexDirection="row" alignItems="center">
|
|
72
|
+
<Text bold>Welcome to Bingo Code</Text>
|
|
73
|
+
{version ? <Text dimColor> v{version}</Text> : null}
|
|
74
|
+
<Box marginLeft={1}>
|
|
75
|
+
<Chip label="Theme" value={themeLabel} tone="accent" />
|
|
76
|
+
</Box>
|
|
77
|
+
<Chip label="UI" value={uiChipValue} tone={uiTone as any} />
|
|
78
|
+
</Box>
|
|
79
|
+
|
|
80
|
+
{/* Row 2: IP / server status */}
|
|
81
|
+
<Box>
|
|
82
|
+
{ip ? (
|
|
83
|
+
<Text color="green" dimColor>IP: {ip}</Text>
|
|
84
|
+
) : (
|
|
85
|
+
<Text color="yellow" dimColor>{ready ? 'Server ready' : 'Starting server…'}</Text>
|
|
86
|
+
)}
|
|
87
|
+
</Box>
|
|
88
|
+
|
|
89
|
+
{/* Row 3: keyboard shortcuts */}
|
|
90
|
+
<Box>
|
|
91
|
+
<Text dimColor>N New · R Resume · P Provider · G Theme · ? Help</Text>
|
|
92
|
+
</Box>
|
|
93
|
+
</Box>
|
|
94
|
+
</Box>
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export default TopToolbar;
|
|
@@ -45,9 +45,13 @@ export function anthropicToOpenaiChat(body: AnthropicRequest): OpenAIChatRequest
|
|
|
45
45
|
|
|
46
46
|
// max_tokens — cap to avoid upstream 400 errors from Claude's high defaults (e.g. 64k).
|
|
47
47
|
// DeepSeek: tools/thinking fail above 8192. Other providers: 32768 covers most upstreams.
|
|
48
|
+
// GPT models (gpt-*): use max_completion_tokens instead of max_tokens (required by newer GPT models).
|
|
48
49
|
if (body.max_tokens !== undefined) {
|
|
49
|
-
|
|
50
|
+
const modelLower = body.model.toLowerCase()
|
|
51
|
+
if (modelLower.includes('deepseek')) {
|
|
50
52
|
result.max_tokens = Math.min(body.max_tokens, 8192)
|
|
53
|
+
} else if (modelLower.startsWith('gpt-') || modelLower.startsWith('o1') || modelLower.startsWith('o3') || modelLower.startsWith('o4')) {
|
|
54
|
+
result.max_completion_tokens = body.max_tokens
|
|
51
55
|
} else {
|
|
52
56
|
result.max_tokens = Math.min(body.max_tokens, 32768)
|
|
53
57
|
}
|