-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathindex.js
More file actions
75 lines (69 loc) · 1.88 KB
/
Copy pathindex.js
File metadata and controls
75 lines (69 loc) · 1.88 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
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const configPath = path.join(__dirname, 'config.js');
const defaultConfig = `// For advanced configuration, edit \`constants.js\`.
const config = Object.freeze({
defaultModel: 'gemini-flash-lite-latest',
nanoBananaModel: 'gemini-2.5-flash-image',
enableNanoBananaMode: false,
maxGenerationAttempts: 3,
defaultResponseFormat: 'Embedded',
defaultResponseActionButtons: true,
hexColour: '#505050',
workInDMs: true,
shouldDisplayPersonalityButtons: true,
enableGeminiApiLogging: false,
SEND_RETRY_ERRORS_TO_DISCORD: true,
defaultPersonality:
"You are Gemini, a large language model trained by Google.",
activities: [
{
name: 'With Code',
type: 'Playing',
},
{
name: 'Something',
type: 'Listening',
},
{
name: 'You',
type: 'Watching',
},
],
defaultServerSettings: {
serverChatHistory: false,
customServerPersonality: false,
settingsSaveButton: 'decide',
responseStyle: 'decide',
},
defaultChannelSettings: {
alwaysRespond: false,
channelWideChatHistory: false,
customChannelPersonality: false,
settingsSaveButton: 'decide',
responseStyle: 'decide',
},
defaultGeminiToolPreferences: {
googleSearch: true,
urlContext: true,
codeExecution: false,
},
chatHistoryLimits: {
users: 10,
servers: 12,
channels: 15,
},
recentChannelMessagesLimit: 15,
});
export default config;
`;
if (!fs.existsSync(configPath)) {
console.log('config.js not found. Creating default configuration...');
fs.writeFileSync(configPath, defaultConfig);
console.log('Default config.js created.');
}
// Dynamically import the main application entry point
await import('./src/startup/main.js');