-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathtools.ts
More file actions
87 lines (83 loc) · 2.31 KB
/
Copy pathtools.ts
File metadata and controls
87 lines (83 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
export type ToolId = 'claude' | 'gemini' | 'codex' | 'opencode';
export type ToolItem = {
id: ToolId;
icon: string | null;
label: string;
disabled: boolean;
/** Tailwind classes for the icon badge when the tool is available (ignored while disabled). */
accentClass: string;
/** Solid Tailwind background class for the small "this one is running" status dot. */
dotClass: string;
};
export const toolItems: ToolItem[] = [
{
id: 'claude',
icon: 'mingcute:claude-line',
label: 'Claude Code',
disabled: false,
// Original brand colors, not the app's accent palette — kept recognizable at a glance.
accentClass: 'bg-orange-500/10 text-orange-400',
dotClass: 'bg-orange-400'
},
{
id: 'gemini',
icon: 'simple-icons:googlegemini',
label: 'Gemini CLI',
disabled: false,
accentClass: 'bg-blue-500/10 text-blue-400',
dotClass: 'bg-blue-400'
},
{
id: 'codex',
icon: 'hugeicons:chat-gpt',
label: 'Codex CLI',
disabled: true,
accentClass: 'bg-bc-orchid/10 text-bc-orchid',
dotClass: 'bg-bc-orchid'
},
{
id: 'opencode',
icon: null,
label: 'OpenCode',
disabled: true,
accentClass: 'bg-bc-coral/10 text-bc-coral',
dotClass: 'bg-bc-coral'
}
];
export type CLIConfig = {
userImage: string;
storageKey: string;
command: string;
args: string[];
projectFile?: string;
openCallback?: (urlOrPath: string) => void;
};
export const cliConfigs: Record<string, CLIConfig> = {
claude: {
userImage: 'wss://disks.browserpod.io/claude_20260506.ext2',
storageKey: 'claude_20260506',
command: 'node',
args: ['/home/user/claude-extracted/src/entrypoints/cli.js'],
projectFile: '/project/claude/CLAUDE.md',
openCallback: (urlOrPath: string) => {
if (
urlOrPath.startsWith('https://claude.com/cai/oauth/authorize') ||
urlOrPath.startsWith('https://platform.claude.com/oauth/authorize')
) {
// Rewrite the localhost callback to the code-based exchange
const fixedUrl = urlOrPath.replace(
'http%3A%2F%2Flocalhost%3A0',
'https%3A%2F%2Fplatform.claude.com%2Foauth%2Fcode'
);
window.open(fixedUrl, '_blank');
}
}
},
gemini: {
userImage: 'wss://disks.browserpod.io/gemini_20260430_2.ext2',
storageKey: 'gemini_20260430_2',
command: 'node',
args: ['/home/user/node_modules/@google/gemini-cli/bundle/gemini.js'],
projectFile: '/project/gemini/GEMINI.md'
}
};