779ca4872b
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome. - Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'. - Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock. - Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters. - Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
/**
|
|
* Settings Configuration
|
|
*
|
|
* Override settings using SettingsManager.
|
|
*/
|
|
import { createAgentSession, loadSettings, SessionManager, SettingsManager } from "@oh-my-pi/pi-coding-agent";
|
|
|
|
// Load current settings (merged global + project)
|
|
const settings = await loadSettings();
|
|
console.log("Current settings:", JSON.stringify(settings, null, 2));
|
|
|
|
// Override specific settings
|
|
const settingsManager = await SettingsManager.create();
|
|
settingsManager.applyOverrides({
|
|
compaction: { enabled: false },
|
|
retry: { enabled: true, maxRetries: 5, baseDelayMs: 1000 },
|
|
});
|
|
|
|
await createAgentSession({
|
|
settingsManager,
|
|
sessionManager: SessionManager.inMemory(),
|
|
});
|
|
|
|
console.log("Session created with custom settings");
|
|
|
|
// For testing without file I/O:
|
|
const inMemorySettings = SettingsManager.inMemory({
|
|
compaction: { enabled: false },
|
|
retry: { enabled: false },
|
|
});
|
|
|
|
await createAgentSession({
|
|
settingsManager: inMemorySettings,
|
|
sessionManager: SessionManager.inMemory(),
|
|
});
|
|
|
|
console.log("Test session created with in-memory settings");
|