mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-02 20:43:36 +00:00
- Introduced server log level configuration and HTTP request logging settings, allowing users to control the verbosity of server logs and enable or disable request logging at runtime. - Added an Event Hook Service to execute custom actions based on system events, supporting shell commands and HTTP webhooks. - Enhanced the UI with new sections for managing server logging preferences and event hooks, including a dialog for creating and editing hooks. - Updated global settings to include server log level and request logging options, ensuring persistence across sessions. These changes aim to improve debugging capabilities and provide users with customizable event-driven actions within the application.
42 lines
829 B
TypeScript
42 lines
829 B
TypeScript
import { useState, useCallback } from 'react';
|
|
|
|
export type SettingsViewId =
|
|
| 'api-keys'
|
|
| 'claude'
|
|
| 'providers'
|
|
| 'claude-provider'
|
|
| 'cursor-provider'
|
|
| 'codex-provider'
|
|
| 'opencode-provider'
|
|
| 'mcp-servers'
|
|
| 'prompts'
|
|
| 'model-defaults'
|
|
| 'appearance'
|
|
| 'terminal'
|
|
| 'keyboard'
|
|
| 'audio'
|
|
| 'event-hooks'
|
|
| 'defaults'
|
|
| 'worktrees'
|
|
| 'account'
|
|
| 'security'
|
|
| 'developer'
|
|
| 'danger';
|
|
|
|
interface UseSettingsViewOptions {
|
|
initialView?: SettingsViewId;
|
|
}
|
|
|
|
export function useSettingsView({ initialView = 'model-defaults' }: UseSettingsViewOptions = {}) {
|
|
const [activeView, setActiveView] = useState<SettingsViewId>(initialView);
|
|
|
|
const navigateTo = useCallback((viewId: SettingsViewId) => {
|
|
setActiveView(viewId);
|
|
}, []);
|
|
|
|
return {
|
|
activeView,
|
|
navigateTo,
|
|
};
|
|
}
|