- Add intelligent-router.sh hook for automatic agent routing - Add AUTO-TRIGGER-SUMMARY.md documentation - Add FINAL-INTEGRATION-SUMMARY.md documentation - Complete Prometheus integration (6 commands + 4 tools) - Complete Dexto integration (12 commands + 5 tools) - Enhanced Ralph with access to all agents - Fix /clawd command (removed disable-model-invocation) - Update hooks.json to v5 with intelligent routing - 291 total skills now available - All 21 commands with automatic routing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
64 lines
1.7 KiB
TypeScript
64 lines
1.7 KiB
TypeScript
/**
|
|
* Preference Store
|
|
*
|
|
* Manages user preferences with localStorage persistence.
|
|
* Uses zustand persist middleware for automatic sync.
|
|
*/
|
|
|
|
import { create } from 'zustand';
|
|
import { persist } from 'zustand/middleware';
|
|
|
|
// =============================================================================
|
|
// Types
|
|
// =============================================================================
|
|
|
|
/**
|
|
* User preference state
|
|
*/
|
|
export interface PreferenceState {
|
|
/**
|
|
* Whether streaming mode is enabled (SSE vs sync)
|
|
* @default true
|
|
*/
|
|
isStreaming: boolean;
|
|
}
|
|
|
|
// =============================================================================
|
|
// Store Interface
|
|
// =============================================================================
|
|
|
|
interface PreferenceStore extends PreferenceState {
|
|
/**
|
|
* Toggle streaming mode
|
|
*/
|
|
setStreaming: (enabled: boolean) => void;
|
|
}
|
|
|
|
// =============================================================================
|
|
// Default State
|
|
// =============================================================================
|
|
|
|
const defaultState: PreferenceState = {
|
|
isStreaming: true, // Default to streaming enabled
|
|
};
|
|
|
|
// =============================================================================
|
|
// Store Implementation
|
|
// =============================================================================
|
|
|
|
export const usePreferenceStore = create<PreferenceStore>()(
|
|
persist(
|
|
(set) => ({
|
|
...defaultState,
|
|
|
|
setStreaming: (enabled) => {
|
|
set({ isStreaming: enabled });
|
|
},
|
|
}),
|
|
{
|
|
name: 'dexto-preferences', // localStorage key
|
|
version: 1,
|
|
}
|
|
)
|
|
);
|