mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-06 15:39:41 +02:00
feat(ui): add enable/disable toggle for Ralph Wiggum tracker
Add ability to enable/disable the Ralph tracker: - Per-session toggle in Session Options > Ralph Wiggum tab - Global default toggle in App Settings Changes: - Add "Enable Tracker" toggle to ralph-tab in session options modal - Add "Enable Ralph Wiggum Tracker" toggle to app settings modal - Update /api/sessions/:id/inner-config endpoint to handle `enabled` param - Add CSS for toggle switch component - New sessions inherit global setting from app settings - Setting is saved in innerConfig and synced with backend Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+12
-1
@@ -245,7 +245,8 @@ export class WebServer extends EventEmitter {
|
||||
// Configure inner loop (Ralph Wiggum) settings
|
||||
this.app.post('/api/sessions/:id/inner-config', async (req) => {
|
||||
const { id } = req.params as { id: string };
|
||||
const { completionPhrase, maxIterations, maxTodos, todoExpirationMinutes } = req.body as {
|
||||
const { enabled, completionPhrase, maxIterations, maxTodos, todoExpirationMinutes } = req.body as {
|
||||
enabled?: boolean;
|
||||
completionPhrase?: string;
|
||||
maxIterations?: number;
|
||||
maxTodos?: number;
|
||||
@@ -257,6 +258,15 @@ export class WebServer extends EventEmitter {
|
||||
return { success: false, error: 'Session not found' };
|
||||
}
|
||||
|
||||
// Enable/disable the tracker
|
||||
if (enabled !== undefined) {
|
||||
if (enabled) {
|
||||
session.innerLoopTracker.enable();
|
||||
} else {
|
||||
session.innerLoopTracker.disable();
|
||||
}
|
||||
}
|
||||
|
||||
// Configure the inner loop tracker
|
||||
if (completionPhrase !== undefined) {
|
||||
// Start loop with completion phrase to set it up for watching
|
||||
@@ -271,6 +281,7 @@ export class WebServer extends EventEmitter {
|
||||
|
||||
// Store additional config on session for reference
|
||||
(session as any).innerConfig = {
|
||||
enabled: enabled ?? session.innerLoopTracker.enabled,
|
||||
completionPhrase: completionPhrase || '',
|
||||
maxIterations: maxIterations || 0,
|
||||
maxTodos: maxTodos || 50,
|
||||
|
||||
Reference in New Issue
Block a user